The flickering or twinkling effect of lights when observed from a distance is caused by anomalous refraction as light passes through air, schlieren, where temperatures and densities vary. The technical term for this phenomenon is called "scintillation," and it refers to the rapid changes in the position and color of a distant object.
If the light source lies outside the atmosphere of the Earth, such as the stars and the planet, the term for the flickering effect is called "atmospheric scintillation." When the source of illumination is Earth-bound, the phenomenon is referred to as "terrestrial scintillation."
Wind movements that are carrying schlieren flowing across an observer's line of sight causes the light fluctuations that are characteristic of the scintillation phenomena. Studies also show that relative humidity affects the intensity of terrestrial scintillation. As humidity increases, so does the effect of terrestrial scintillation.
When it comes to stars, the light emanating from these heavenly bodies are disturbed by atmospheric turbulence that acts as refractive prisms and lenses, thereby causing the flickering or "twinkling" effect. Since the source of light is so tiny, the point of light falls upon one rod of the retina at a time. Stars will appear to twinkle as the point of light moves from one rod to another.