The Green flash results from a combination of scattering and refraction of light. Everyone is aware of the effect of atmospheric scattering on the light from the sun: if you look into the sky almost anywhere except towards the sun in a clear sky, you see blue. This light is light that (obviously) has not come to you directly, but has been scattered in the sky. So blue light is scattered more than other colours (actually the scattering fraction goes as as the inverse fourth power of the wavelength). The converse of this is that, when one looks through the sky at the sun, one sees the light from the sun, but with some of the blue light removed by scattering. When one looks at the sun horizontally (at dawn or dusk) one looks through a thick layer of atmosphere and so much blue and green is scattered out that the sun appears red. So far so normal.|
Most of us are aware of atmospheric refraction - the bending of light in air of differing densities - which is responsible for mirages such as the "water on the road" on hot days. (Here's a photo of such a mirage.) The light from the sun bends towards the earth when it enters the atmosphere (at point c in the diagram), so that it is possible to see the sun even when the earth lies between the sun and the observer. All the light is bent, but blue (b in the diagram) is bent most and red (r) is bent least. For observer at point a, the red light from the sun does not bend enough to be seen, so his/her image of the sun will have no red light--for this observer, the red image of the sun has already set. Blue and green light do bend enough (the blue and green suns have not yet set!), but the blue light is scattered out by the large thickness of atmosphere traversed by the light. So the image is green for a short time. The effect requires very clear air, so that not too much green is scattered, and a rather flat horizon. The duration is variable. Some atmospheric effects probably magnify the angle of the green limb, so that the effect lasts longer.
The effect is real--photographs, including a study by the Vatican's observatory, show it. It is however made more spectacular by the fact that, while you are looking at the red sun, your red photoreceptors suffer retinal fatigue so that, when the red light disappears, the remaining green appears all the more vivid. This is one of the reasons why it is easier to see the green flash in the evening. The others are that it is easier to predict where and when the sun will set than where and when it will rise, and that some of us see more sunsets than sunrises!
I've only seen it four times. The first was when a friend and I watched a sunset from the top of the Dune du Pila on the French Atlantic coast under propitious conditions. The last limb of the sun seemed to disappear and we both thought that we had been unlucky. Then suddenly we saw a bright, clear green line where the sun had disappeared. We were too astonished to take a photo. I live on an East coast and look for it at dawn, but have never yet seen it over the Pacific. Once was on the boat, anchored in Port Hacking with two close friends, sitting on the deck, aperitifs in hand while the dinner cooked. Once in Italy and once in Freemantle. When eventually I catch it with a camera in hand, the photo will go here!