The visible aurorae result from electrons that move along magnetic field lines from space into the upper atmosphere. There, the electrons lose their energy in collisions with atoms and molecules, which, in turn, radiate this energy as light. To generate an aurora, we need enough electrons of sufficient energy, a magnetic field to guide them, and an atmosphere to produce the light. Earth meets these conditions: The atmosphere is everywhere, and the magnetic field reaches into space at high latitudes. The question is, then, where do the energetic electrons come from?
Astronomy magazine subscribers can read the full answer for free. Just make sure you're registered with the website.