This animation depicts the process that is believed to account for the martian nightglow.
When exposed to solar ultraviolet radiation above an altitude of 70 km, carbon dioxide molecules – the main atmospheric constituent of Mars' atmosphere – are split into carbon monoxide and oxygen atoms. Those oxygen atoms (depicted as red spheres) are transported by a gigantic Hadley cell, which features an ascending branch above the daytime summer pole and a descending branch over the winter pole, which is in the night hemisphere. The oxygen atoms recombine into molecular oxygen in the descending branch of the Hadley cell, at an altitude of 30-50 km, emitting infrared radiation.
The OMEGA instrument on Mars Express detected infrared emission on the night side of Mars, above the polar regions, in 2012.
In 2023, it was found that the recombination of oxygen molecules shown in this animation also produces emission in visible wavelengths, as detected by the NOMAD instrument on the ExoMars Trace Gas Orbiter. Further details in the paper published by Nature Astronomy.