The Northern Lights are an interaction between our
atmosphere and energetic particles from the sun. In a
process which takes several days, particles that were
shot out from the sun travel to earth and are attracted
to the Northernmost and Southernmost poles due to the
pull of Earth's magnetic field on these charged
particles. These charged particles are what create these
amazing shows of light at out poles. According to
Physics.org:
The Earth’s magnetic field traps parts of the solar wind as it passes the planet, and the electrons and ions that make up that wind travel towards the Earth’s magnetic poles. Molecules and atoms in the Earth’s upper atmosphere are left ionized or excited by collisions with the particles from the solar wind, and in either regaining an electron or returning to their ground state, they emit light – the glow of the aurora.
These entrancing lights also have an effect on our
atmosphere. The law of Conservation of Energy states
that energy cannot be created nor destroyed. What does
this mean for us? All the energy that enters our
atmosphere (a closed system) is still in our
atmosphere in one form or another. For our
average light show, this doesn't mean too much. Yes, the
energy from the sun that was contained in these
particles is now in our atmosphere in the form of light
and heat, but, according to the UAF Aurora Forcast,
"[S]ince the aurora takes place at about 90 – 100
kilometers (55.2 – 62.3 miles) altitude, only the
atmosphere at or above that height is affected by aurora
(auroraforecast.gi.alaska.edu/faq.php#environment)."
However, geomagnetic storms aren't your average light
show. These storms, due to the high influx of particles,
effects of solar wind and other particular
circumstances, have a strong effect on our atmosphere,
even causing changes in the rotation of
satellites. Learn more about geomagnetic storms here.
Thus, through an influx of energy into our atmosphere
and magnetic field, the northern lights appear. This
sounds pretty magical, and it is. As these particles
from the sun interact with the gases in our atmosphere,
the gasses begin emitting their excess energy in the
form of light. According to as student at Oregon State
University, "When charged particles from the sun hit
particles of these atmospheric gasses, they ionize or
excite the gas particles and cause them to glow and
their return to ground state is what emits the
aurorae. The green aurorae are produced from a
reaction of solar particles with oxygen at altitudes of
up to 150 miles . . . "
(physics.oregonstate.edu/~giebultt/COURSES/ph313/Extermpap2.pdf).
Learn more about the colors of the Aurora and why green
is the most common here.