The hydrogen spectrum appears when an electron absorbs a photon, jumps an orbital, and then releases that photon in an effort to get back to its ground state. From what I've read electricity is composed only of electrons, not photons ( see http://amasci.com/miscon/energ1.html for details ). If this is the case, then when electricity is ran through a tube of hydrogen the hydrogen spectrum should not appear since there are no photons to be absorbed. Yet experiments time and time again show that electricity causes the hydrogen spectrum to appear. If anyone has any explanations for this I'd be happy to hear them. Thank you in advance for your help.
This a confused question, but it can be answered.
Running an electric current through a hydrogen gas typically means sending electrons through the gas, as in an electric discharge.
Those energetic electrons can scatter off electrons in the $H_2$ molecule and transfer those to a higher orbit, leaving the molecule in an excited state. In due time the molecule (or atom) in its excited state will fall back into the ground state. The excess energy is radiated away in the form of photons.
Hence we see an emission spectrum. And, of course, this is how "Neon lights" work where the gas in question is a noble gas like neon or argon.
So, in this case it was not a photon that excited the atom or molecule into a more energetic state. Instead the excitation is caused by an incoming energetic electron that kicks the atomic or molecular electron into a more energetic orbit.
First of all, you are not talking about free electrons, but bound electrons. Electrons are not orbiting in a classical way around the nucleus, but the electron exist around the nucleus at a certain energy level as per QM.
Bound electrons can be excited (atoms can be excited) in a few ways:
photoexcitation, the electron absorbs a photon, and moves to a higher energy level as per QM
electrical excitation, the electron absorbs the energy of another, energetic electron (kinetic energy of a free electron)
The simplest way is to heat the sample, and because of temperature, the thermal energy (kinetic) of the atoms produces collisions between the electrons of the atoms and those electrons who absorb kinetic energy will move to a higher energy level.
In your case, the electricity that is ran through the tube is in form of free electrons, and those electrons have high kinetic energy, and collide with the electron in the gas, and excite the atoms in the gas, and the valence electrons of the atoms in the gas absorb the kinetic energy of the free electrons, and move to a higher energy level.
Now when the electron moves back to a lower more stable energy level, that is electron relaxation. It can happen in more then one step. Sometimes the electron at the higher level (though it only absorbed one photon or only absorbed kinetic energy from one electron) will move to a lower energy level by emitting more then one photon.
The emission spectrum can be used to check the composition of the material, since it is different for the elements.
In astronomical spectroscopy, they analyze the composition of start by the received light. The emission spectrum characteristics for some element are visible with the naked eye. Copper makes green color.
Not all light emitted are visible for the naked eye, it includes ultra violet and infra red, emission is formed when excited gas is viewed under a spectroscope.