When the electrons cross the junction, they drop from the higher energy level to the lower one, and the energy each electron loses when it drops takes the form of light to a large extent.
The report by the Rail Accident Investigation Branch (RAIB) found engineering work on the line between Southcote Junction in Reading and Westbury meant the automatic half barrier level crossing was being controlled locally.