It sounds like something from a fairy tale. If you look at the horizon at sunsetexactly as the last sliver of sun disappearsyou might see a flash of brilliant green blaze across the sky. Indeed, an old Scottish proverb maintains that whoever sees this flash will always be lucky in love. While we can't confirm the lucky-in-love part of this, there is a scientific explanation for the flash of green light.
As sunlight enters our atmosphere, it bends slightly. This is due to refraction, the same thing that makes a pencil look slightly askew when you stick it half way into a glass of water. The atmospheric bending of light rays is greatest when the sun is right along the horizon, at sunrise or sunset.
How does bending sunlight create a green flash? When sunlight is bent by refraction, it separates into different colors, just like light through a prism. While a prism can make a dramatic rainbow, atmospheric refraction isn't that strong.
It doesn't turn the sun into a rainbow, but it makes the lowest part of the sun seem a bit more red, and the top of the sun seem greenish blue. The effect is so subtle, you'd never notice it.
Except, of course, at sunset or sunrise. For a split second, when most of the sun's globe is below the horizon, the only part showing is that blue-green sliver along the top. Blue light is scattered by the atmosphere, so what's left is a brief flash of green, the only illumination in the sky!
Please remember, this happens immediately AFTER a sunset; NEVER look directly at the setting sun.