Fortunately the Earth’s magnetosphere deflects most of these away from us. But the field comes back to Earth at the poles and these high energy charged particles come rushing down into the atmosphere (in some cases accelerated by the Earth’s magnetic field).
These particles “excite” the atoms in the air by giving the atoms electrons more energy, which then get rid of the energy again as light. Blue or Red for nitrogen (70% of the air) and Red and Green for the oxygen.
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. Green is the most common of all auroras. Behind it is pink, a mixture of light green and red, followed by pure red, yellow (a mixture of red and green), and lastly pure blue.
Just like iron filings line up along a magnetic field, so do the charged particles. We get sheets of air glowing when hit by the particles following the Earth’s field lines, drifting and swirling around. We call them Aurora. Aurora Borealis (a.k.a. The Northern Lights) and Aurora Australis (The Southern Lights).
Here is a BBC Stargazing Live video explaining Aurora – it’s aimed at Primary kids so it’s kept nice and simple.
Below is a slide show of Aurora photos taken during January 2012.
Sources: Wikipedia, BBC News, BBC Stargazing Live, Various Newspaper websites.