High Intensity Discharge (HID) lamps create light by heating up materials inside the arc tube. Metal Halide lamps, for example, heat up the scandium inside the tube.
When electrical power is applied to the arc tube, free electrons (that are not bound to an atom) flow through the arc tube. Then they collide with other electrons that are bound to, and orbiting around, the Scandium atoms.
During this collision, a bound electron is knocked out of its orbit. It cannot escape the pull of the nucleus, and is drawn back. When the electron snaps back into its orbit, a release of visible energy occurs. This visible energy is called a photon.
The distance from the orbiting electron to the nucleus determines the energy levels of the photons created.
We record these energy levels, or wavelengths, on spectral distribution charts (also known as relative energy charts.)