I love watching sunsets on cruises. Sometimes if you are lucky you can catch a green flash as the sun is setting. This one I caught on the west coast of Mexico April 26, 2019.
This is the explanation from World of Phenomena:
https://www.phenomena.org/atmospheric/greenflash/
Why does the top of the sun appear green? Think of the sunset and how the sun’s orange and red colors look hazy and huge as the sun appears to sink and touch the horizon. The reds of a sunset are caused by the same effect as a green flash—both are caused by refraction of light. As the sun sets, the light is viewed through a greater and greater density of molecules and the light is therefore refracted as the atmospheric soup acts as a prism spreading the rainbow of light. As the light passes through water vapor and other particles in the atmosphere this prism effect causes the sunlight to absorb and refract different wavelengths of electromagnetic energy we call colors. This explains how the oceans horizon with its thermal difference of water and air create an ideal setting for a mirage. At the last seconds of a sunset the color green in the light spectrum is refracted enough to give off the mirage of green. The green appears separate, just above the red-orange setting sunlight. This optical mirage, as seen by the human eye, is a case of looking at the right place at the right time under the right conditions. Besides being green, this explains why seeing a green flash is associated with luck!
Photo Credit: Tim Free
Click for larger image.