What determines the wavelengths of the emission spectra of elements

I'd like to know what causes the wavelengths of the emission spectra of different elements. I know that every element has a different emission spectra, but what determines the wavelengths present in a spectra of any given element? I've heard that it may have something to do with the electron energy levels, but I don't know if that is correct. An in detail explaination would be most helpful. Thanks in advance for any help.

The big concept to focus on here is the Bohr Model of the atom:
(source: gsu.edu)

Imagine that a photon propogating with a very particular amount of energy interacts with an electron in a ground-state ($$n = 1$$) hydrogen atom (here we use hydrogen due to its simplicity; it's just a proton and an electron). If the energy of the photon is just right, the electron will absorb it and move up to, say, the $$n=3$$ energy level, having gained the energy from the photon. Naturally, the electron will "fall" back down to the ground state much like a ball rolling down a flight of stairs where each stair is increasingly further away as it rolls down.

When it "falls" back down, the electron has to lose some energy to enter the lower energy state. This energy is lost as radiation, and is very particular to which energy levels the electron moves between.

As you can see in the picture, an electron in a hydrogen atom falling from $$n=5$$ to $$n=2$$ (i.e., straight down to the first excited state), emits a much larger amount of energy at once, which in this case is a photon with a frequency in the violet range, as opposed to the transition from $$n=3$$ to $$n=2$$, which is that red hydrogen line (656nm wavelength) we all know and love. As a side note, all emissions of an electron moving down to $$n=2$$ in a hydrogen atom from any other energy level are part of the Balmer series

Now if you have something like magnesium, the first few valence levels ($$n=1$$ and $$n=2$$ are all filled up, because the first level "fits" 2 electrons and the second fits 8, and non-ionic magnesium has 12 electrons). Then you have your electrons, which interact with incoming photons, moving between $$n=3$$ and higher, which leads to emission of photons of entirely different frequencies.

• +1 for speed and clarity, and I know you had no choice, but you may take some flak for using bohr model : ) – user108787 Aug 16 '16 at 21:45
• It's the simplest one, and adequately explains the gist of what's happening on the non-quantum scale. – hebetudinous Aug 16 '16 at 21:49
• @hebetudinous: the clear objection is that you're promoting a model that is rightly regarded as obsolete. We deal only with mainstream science on this site, not with paleo-science! – Gert Aug 16 '16 at 22:48
• Yes, the Sommorfeld is more accurate, but the Bohr model is sufficient for explaining the energy levels, just not the orbital shapes. – hebetudinous Aug 17 '16 at 17:14
• So, based on your explanation, would that mean that if an energy level is full with the most electrons it can hold, then another electron wouldn't be able to jump down to it after jumping up due to a photon? If so, wouldn't that be what limits the spectra of any given element? – K Ferreira Aug 21 '16 at 13:57