Why does aluminum have a lower first ionization energy than magnesium?
The easiest way to explain it is that $\ce{Al}$ has one unpaired electron in it's highest energy orbital ($\mathrm{3p}$), and $\ce{Mg}$'s highest energy orbital ($\mathrm{3s}$) the electrons are paired. It is energetically favorable for all the electrons in an orbital to be paired, which means that breaking up this pair would require more energy.

Here's what their orbital pairings look like: 


and if you look at the general trend you can see that this occurs whenever all the valence electrons are paired: 




Sources:
http://chemed.chem.purdue.edu/genchem/topicreview/bp/ch7/ie_ea.html
http://en.wikipedia.org/wiki/Electron_pair