Light is an interesting beast. We treat it as a particle (the photon) that travels with no mass and at the fastest possible speed through the universe. But light also behaves as a wave; it has a frequency, or a color, associated with the amount of energy it carries. The more energy a photon carries, the bluer its color. (This trend continues far beyond the visible range of light; radio waves are the reddest color of light, and gamma rays are the furthest to the blue.) When light interacts with an atom, a number of things can happen, depending on the complexity of the atom and the energy of the photon.
Let’s simplify things by dealing with hydrogen. It’s the simplest possible atom, with one proton and one electron, and it’s what the majority of the universe is filled with. The electron is bound to a region of space around the proton by a series of electromagnetic barriers, but if you had enough energy to donate to the electron, it could bounce its way over the barriers and wander around space freely.
This is where light comes in - photons are very effective carriers of energy. Depending on the source of the photon (normally a nearby star), they can be more or less energetic. The redder the nearby star, the lower the average energy of the photon you get. We’ll take one of these photons, and smash it into our atom.
If the energy of the photon is less than the amount you’d need for the electron to hop out of its electromagnetic moat, the electron will remain stuck to its proton. However, our electromagnetic barrier has a series of little ledges in it where an electron can hop up and stay for a little while. If the energy of the photon happens to match up with the amount of energy the electron needs to jump up to one of these ledges, the photon will get completely absorbed. The electron won’t stay there forever, and when the electron drops back down to the bottom of the moat, it will emit light of the color that corresponds to the amount of energy it took to get to the ledge.
If, however, the photon happens to be energetic enough for the electron to break free from its proton, you have successfully ionized an atom! The electron will wander around aimlessly for some time, until it encounters a lone proton with no electron. The electron will fall back into the potential well, which undoes the ionization of the atom. The electron has to lose energy to do this, so it spits out a photon with a color corresponding to the amount of energy lost. If you have enough hydrogen floating around in the same place, you wind up with a cloud of glowing gas - but only glowing at very specific colours! This complex sea of escaping and recaptured electrons is what lights up an emission nebula.
Sign up for the mailing list for updates & news straight to your inbox!