Respuesta :

when energy is put into an atom, the electrons can use the energy to go to a higher energy state (n value) which is called an exited state.  when the electron goes back down to where it started (called the ground state) it releases the energy it gained in the form of a photon which is why it produces light.  
A common way to get hydrogen gas to produce light is by passing an electric current through the sample.