Pretty simple actually. To start off, we have the Van-Allen belts, also known as the earth's magnetic field lines. Basic tendency of magnetism is that a charged particle inside a magnetic field will move laterally through the field with the force acting purpendicular to both the direction of the field and the direction of the charge's velocity. What ends up happening is that a charged particle makes a spiral around the Van-Allen belt as it moves along the length of the field line. At the poles where the field lines come together, the particles become more concentrated (sort of like what happens in a traffic circle- cars come together from all directions).
Now where the sun comes in: The sun throws out massive amounts of both matter and energy, in more than just the form of light and gas. When the magnetic energy from a large solar flare passes through the charged atoms, it causes them to go up to a higher energy level, and thus visable light is emitted in the form of Aurora Borealis. Not only is visable light emitted from the charged atoms, but because they're going to a higher energy level, they have to absorb energy and they do, harmlessly absorbing energy in the form of a spectacular light show (energy that if it weren't stopped by something, would make us all dead).
That's my take on the process.
And all at once the crowd begins to sing: Sometimes the hardest thing and the right thing are the same