The green flash has nothing to do with the red Flash of comic books. They are an optical phenomena that sometimes occur just after sunset or right before sunrise.
With the right conditions, a distinct green spot is briefly visible for just a second or two above the upper rim of the Sun’s disk. It may look like green ray shooting up from the sunset (or sunrise) point.
These green flashes occur because the Earth’s atmosphere can cause the light from the sun to separate out into different colors.
They can be seen with the naked eye looking at a very clear and very distant horizon. Looking at a location near an ocean improves your chances.
The time to view is at the last moment before the sun disappears below the horizon. Don’t look too soon because the sun can dazzle (and possibly damage!) your eyesight.
The flash doesn’t occur at every sunset or at every location. It is an atmospheric trick. I have yet to catch one, but I keep checking whenever I am near an ocean sunrise or sunset.