Why lithium gives flame coloration?
I would love to find numbers, but alas, I have failed. If anyone can point me towards energy differences between the orbitals I am lacking, please feel free!

There is no a priori physical reason why lithium, sodium, potassium and calcium give flame colours but beryllium and magnesium would not. For all these elements (and hydrogen), the principal mechanism works in the same way: An electron is thermally excited into a higher orbital, and when it relaxes back to its ground state it releases a photon of exactly that wavelength. The flame colour is always due to gaseous atoms (not ions), so the electrons are always excited from an s-orbital.

The strongest lowest-energy excitation and relaxation should always be $n\mathrm{s} \rightarrow n\mathrm{p}$, i.e. from one shell’s s-subshell to that shell’s p-subshell. For sodium, this energy difference corresponds to $589~\mathrm{nm}$ or $2.10~\mathrm{eV}$, for lithium it is $671~\mathrm{nm}$ or $1.85~\mathrm{eV}$, for potassium $767~\mathrm{nm}$ and $1.61~\mathrm{eV}$ and for calcium $657~\mathrm{nm}$ and $1.89~\mathrm{eV}$.[1]

We can see that the energy difference rises from potassium to calcium, even though they are neighbours and the excitation is from the same orbital to the same different one. This is because calcium’s higher nuclear charge contracts the orbitals, stabilises them and thus lowers their energy — compare with the ionisation energy which also typically rises across a period. This effect is, of course, more pronounced when going across the second or third period when compared to the fourth; thus, I would expect an even greater energy difference when going from sodium to magnesium and even greater than that from lithium to beryllium.

The best explanation I have for the colourlessness of magnesium and beryllium is that their excitations are too close to ultraviolet to be properly observed due to strong contractions of the orbitals, but without numbers that is a weak explanation at best.



Notes:

[1]: I would be grateful for confirmation that these values I found are correct.