Per Wikipedia:
Green flashes occur because the atmosphere can cause the light from the
sun to separate out into different colors. Green flashes are a group of
phenomena which stem from slightly different causes, and therefore some
types of green flashes are more common than others.