Using a vacuum chamber and lasers, a new study explains how the sun breaks apart the organic matter on a comet, causing it to glow green. However, this process occurs so quickly, it’s only the comets’ heads that appear green, never their tails.
Source