Possibly from the Gaelic, "rock" or "noble"; possibly brought to Britain by the Normans. Alan is the most frequent spelling in Britain; Allan and Allen are more common in USA.
Chambers suggests the meaning is "harmony".
Alanus or Alannus were used as Latinised versions of Alan in many old documents. Search on Alan* to take account of Latin case endings.
There is a similar Hungarian name, Alán, which is believed to be of Celtic derivation but it's origin is unclear.