Do you know how LED's work or most any optoelectronic device? Basically you have a band gap that separates the valence and conduction bands. Well if you can get an electron up into the conduction band then it is free to move around. And if it drops back down to the valence band it will lose energy which is usually given off as a photon.
Similar to electrons in the orbitals of an atom. When they go from a higher state to a lower state they lose energy. That energy is converted to a photon.
Although that is just the tip of the iceberg, it should keep you fairly busy.