Northern Lights (Auroras) are the result of the emissions of photons in the Earth's upper atmosphere, above 80 km (50 miles), from ionized nitrogen atoms regaining an electron, and oxygen and nitrogen atoms returning from an excited state to ground state. They are ionized or excited by the collision of solar wind particles being funneled down and accelerated along the Earth's magnetic field lines; excitation energy is lost by the emission of a photon of light, or by collision with another atom or molecule:
Green or brownish-red, depending on the amount of energy absorbed.
Blue or red. Blue if the atom regains an electron after it has been ionized. Red if returning to ground state from an excited state.
Oxygen is unusual in terms of its return to ground state, it can take three quarters of a second to emit green light, and up to two minutes to emit red. Collisions with other atoms or molecules will absorb the excitation energy and prevent emission. The very top of the atmosphere is both a higher percentage of oxygen, and so thin that such collisions are rare enough to allow time for oxygen to emit red. Collisions become more frequent progressing down into the atmosphere, so that red emissions do not have time to happen, and eventually even green light emissions are prevented.
This is why there is a colour differential with altitude; at high altitude oxygen red dominates, then oxygen green and nitrogen blue/red, then finally nitrogen blue/red when collisions prevent oxygen from emitting anything.
Auroras are associated with the solar wind, a flow of ions continuously flowing outward from the sun. The Earth's magnetic field traps these particles, many of which travel toward the poles where they are accelerated toward earth. Collisions between these ions and atmospheric atoms and molecules causes energy releases in the form of auroras appearing in large circles around the poles. Auroras are more frequent and brighter during the intense phase of the solar cycle when coronal mass ejections increase the intensity of the solar wind. Seen from space, these fiery curtains form a thin ring in the shape of a monks tonsure.