Beryllium and magnesium do not give colour to flame whereas other alkaline earth metals do so. Why?
On Heating, the electrons get excited to higher energy level due to taking in of energy. When these electrons return to ground state they emit the extra energy in form if radiations, which are, are in the visibility spectrum hence we can see a flame colour. However, no characteristic colour is shown by Magnesium or Beryllium as their atoms have a smaller size and therefore greater amount of energy is needed for excitation of electron to higher energy level, which is not provided by the flame.