Aurora

The particles that make up the solar wind, upon contact with the Earth's magnetic field, spiral along the lines of this field and collide near the magnetic poles with molecules of nitrogen and oxygen, etc.

An excerpt from the article 16 facts about Aurora
They arouse them, and these, returning to the ground state, radiate energy in the form of light quanta.