What exactly is causing the electric discharge coming from the clouds to emit light while traveling through the air. I've read and thought about it a little but with my current knowledge I cant really figure what is happening at a subatomic level. In other words, what causes the emission of photons during lightning. What I want to know is, is there some sort of collisions taking place that produces the photons we see, or is it some other interaction that is causing it?. I don't know too much about particle physics, I've only read a couple of pages in the Introduction to Elementary Particles by Griffihts. So if you could keep the answer simple then that would be great.
A very interesting question, especially because of the discussion that it spawned.
All the answers here seem to revolve about two different mechanisms:
It's not very easy to find authorative sources on either, but googling for "spectrum of lightning" turned up some sources of interest:
and a bunch of others.
So, in conclusion, why lightning emits light is because:
Since a "single" lightning strike normally consists of several strokes, these processes can be repeated several times in rapid succession, with additional side effects (for example, small pockets of glowing hot air at reduced temperatures may break off during or after strokes, which also contribute to the radiation of light).
Why does it radiate? You want an explanation on a sub-atomic level? Well then, rather than look to the fact that lightning makes the air 'hot' (of course it does), what you really need to know is this: whenever an atom changes energy level (which outside of nuclear reactions means an electron jumps from one orbital to another at a different energy level), it either absorbs a photon (if going to a higher level) or gives one up (if going to a lower). Simply changing kinetic energy (of the whole atom) does not allow all the conservation equations to add up (yes, I am skipping details here).
Now to be sure, lightning generates such a high voltage that it starts by ripping electrons away from atoms completely, which based on the above principle you would expect means absorbing photons, not releasing them. And in fact, it is by absorbing photons from the electrical field generated by lightning that the ionization takes place (because at the most fundamental level, all interactions between light and matter are exchanges of photons). But then the ions collide with other ions and neutral atoms, losing energy and therefore giving up photons.
All this happens very fast, so we see the photons given up in this last phase immediately. There are other processes going on, but they all have in common the principle I mentioned above: transitions from one energy level to another are accompanied by emission/absorption of photons.
The emission of photons is caused by acceleration of charged particles (air in the lightning becomes partially ionized - a mixture between ions and electrons = plasma) which is called thermal radiation.
You can read more about it here: http://en.wikipedia.org/wiki/Thermal_radiation
Basically the air glows because of its high temperature.
There is also a fraction of emission lines (light caused by excited electrons in atoms)
Well I think a lightning is a gas discharge and the light we see is the spontaneous emission from the exited gas molecules.
They are excited because of the ionization (which is a consequence of the high electric field) that makes possible current flow. When they relax in their ground state, light is emitted. Same principle as in fluorescent tubes, but the current is much higher. While the former is a glow discharge, a lightning is a short arc discharge which has strongly different electrical characteristic and has much higher temperatures (http://en.wikipedia.org/wiki/Electric_discharge_in_gases) (thanks to Georg here).
I think to speak of blackbody radiation is not correct here, because a gas with its resonant emission-absorption character is not a blackbody (although blackbody radiation is spontaneous emission, but not vice versa).
I would also hesitate calling it thermal radiation because the light emission is caused by the ionization due to an electric field. An at this very moment the gas is not in a thermal equilibrium (which is the reason why it can emit light at all!). The point is that the molecule is excited because of electric field and not because of thermal motion (as it needs to be for thermal radiation).
UPDATE: Apparently, since it is a arc discharge type, also thermal re-exitation of the molecules/atoms takes place, which then does, in addition, also generate thermal radiation (not to confuse with blackbody radiation, because this thermal radiation also has a line spectrum)
It would be interesting to to relate the time for the arc to reach thermal equilibrium to its total duration, to quantify the relation of thermal to non-thermal light emission. But this is unclear to me.
I think that lightning is mostly caused by emission from nitrogen (~70 % of air) because of the blueish-violet color. Nitrogen has emission lines there, try googling a nitrogen laser which has just this color.
[Adapted from Wikipedia ]