The green flash and green ray are meteorological optical phenomena that sometimes occur transiently around the moment of sunset or sunrise. When the conditions are right, a distinct green spot is briefly visible above the upper rim of the Sun's disk; the green appearance usually lasts for no more than two seconds. Rarely, the green flash can resemble a green ray shooting up from the sunset or sunrise point.
Green flashes occur because the earth's atmosphere can cause the light from the Sun to separate, or refract, into different colors. Green flashes are a group of similar phenomena that stem from slightly different causes, and therefore, some types of green flashes are more common than others.
Read more or edit on Wikipedia