Hot air, being less dense, has a lower refractivity than the ambient air through which light travels in the atmosphere. If light happens to pass through this hot patch, it will change its path. The best example is at sunset. The rays slowly curve their way around. They actually bend over the Earth so that we still see the Sun when it has already sunk behind the horizon.
Air turbulence affects the density of the otherwise homogenous air.
That is why stars twinkle on windy nights. Light is sent on different paths according to the fastand unpredictable microscopic changes of air density. And that is why astronomers had to send the Hubble telescope into orbit. It is not the currents of wind caused by the heat that distort the image, but the change in density of the air. Heating the air decreases its density and changes its refractive index.