

It is due to the phenomena of total internal reflection. On a very hot day in a desert, the air just in contact with sand is hotter than the air above it due to the high temperature of sand. This causes the refractive index of the air in contact with the sand to be lower than that of the air above it. Thus, sunlight passes through a medium of higher refractive index to that of lower refractive index.
At a particular angle, the angle of incidence becomes greater than the critical angle and all the conditions of total internal reflections are fulfilled. This causes the sunlight to reflect from the interface of both the air columns itself without touching the sand. Hence, it appears as a watery surface from far off distances, also known as mirage.
