The spectrum of sunlight peaks in the green wavelengths (520-570 nanometers), explaining why most plants are green: an attempt to optimize the available energy for photosynthesis. Our vision's colour sensitivity also peaks in the greens – the better to hunt green vegetables. With so many greens surrounding us, it would be easy to overlook a rare optical phenomenon in the sky: the green flash at dusk.
Just after the sun's final moment in the sky, a flash of brilliant green may be seen for a brief moment, but - only if the conditions are exactly right. A corresponding flash of green may occur just before the sun rises over the horizon. I've never been lucky enough to see either of these phenomenon. I assume folks saw this flash as soon as they started looking at the sky, however, the first conclusive scientific sighting occurred in 1865 by W. Swan. He described the sight as a 'dazzling emerald green' flash at sunrise. In 1926, a PhD thesis was written on the topic by P.F. Keuper. As I haven't been able to find a copy, I don't know if he found it dazzling or not.
Atmospheric refraction causes the green flash (although other not yet understood phenomenon may be involved). As we know, sunlight is composed of many different wavelengths. In the vacuum of space, all wavelengths of light travel at the same speed (the speed of light, a speed we cannot exceed). Once they hit the atmosphere, some wavelengths are absorbed and some pass through. For now, let's consider the visible spectrum as most of it passes through the atmosphere without being absorbed.
Since the atmosphere is contains more stuff than the vacuum of space, when light enters it slows down. If the incoming light hits the atmosphere straight on, all the wavelengths pass through, albeit at a slightly slower speed. At an angle, the light is forced to bend as it enters the atmosphere – an effect called refraction. This allows us to see things slightly over the horizon, like a ship, because light is refracted the same direction as the earth curves.
The amount light slows differs for the different wavelengths resulting in slightly different bent angles. Higher frequency light (blue/green) bends more than the lower frequencies (red/orange). In the extreme angled case, like a setting sun, the sun's image separates by colour (difficult to see because the sun is so bright and dangerous to look at). If you could slow the sunset down, first red would set, followed by yellow, then green with a remaining glint of blue/violet. Typically, just a flash of green is seen, or if the conditions are exceptional a flash of blue.
If you are setting out to see a green flash, the ideal conditions include a sharp horizon (ie, far away from buildings), perfectly clear air (get even further from those buildings) and a homogeneous atmosphere (a remote desert might work).
For more info, check out wikipedia or Sunsets, Twilights, and Evening Skies by Aden and Majorie Meinel (1983), or The Field Guide to Natural Phenomena by Keith Heidorn and Ian Whitelaw.