Why do roads appear wet on hot days? I don't understand the bending of light rays in relation to the density fluctuations. How are they related? Why do we see mirror images of cars on road in hot days?
It is on a small scale the same as a mirage in a desert.
A mirage is a naturally occurring optical phenomenon in which light rays are bent to produce a displaced image of distant objects or the sky.
In contrast to a hallucination, a mirage is a real optical phenomenon that can be captured on camera, since light rays are actually refracted to form the false image at the observer's location. What the image appears to represent, however, is determined by the interpretive faculties of the human mind. For example, inferior images on land are very easily mistaken for the reflections from a small body of water.
The explanation lies in differences in the density of air due to temperature variations in the air close to the surface
Cold air is denser than warm air and, therefore, has a greater refractive index. As light travels at a shallow angle along a boundary between air of different temperature, the light rays bend towards the colder air. If the air near the ground is warmer than that higher up, the light ray bends upward, effectively being totally reflected just above the ground.
Once the rays reach the viewer’s eye, the visual cortex interprets it as if it traces back along a perfectly straight "line of sight". However, this line is at a tangent to the path the ray takes at the point it reaches the eye. The result is that an "inferior image" of the sky above appears on the ground. The viewer may incorrectly interpret this sight as water that is reflecting the sky, which is, to the brain, a more reasonable and common occurrence.