“Light is a form of energy that can be released by an atom. It is made up of many small particle-like packets that have energy and momentum but no mass. These particles, called photons, are the most basic units of light. Photons are released as a result of moving electrons. In an atom, electrons move in orbitals around the nucleus. Electrons in different orbitals have different amounts of energy. Generally speaking, electrons with greater energy move in orbitals farther away from the nucleus.
For an electron to jump from a lower orbital to a higher orbital, something has to boost its energy level. Conversely, an electron releases energy when it drops from a higher orbital to a lower one. This energy is released in the form of a photon. A greater energy drop releases a higher-energy photon, which is characterized by a higher frequency.
As we saw in the last section, free electrons moving across a diode can fall into empty holes from the P-type layer. This involves a drop from the conduction band to a lower orbital, so the electrons release energy in the form of photons. This happens in any diode, but you can only see the photons when the diode is composed of certain material. The atoms in a standard silicon diode, for example, are arranged in such a way that the electron drops a relatively short distance. As a result, the photon's frequency is so low that it is invisible to the human eye -- it is in the infrared portion of the light spectrum…
…Visible light-emitting diodes (VLEDs), such as the ones that light up numbers in a digital clock, are made of materials characterized by a wider gap between the conduction band and the lower orbitals. The size of the gap determines the frequency of the photon -- in other words, it determines the color of the light.” -Tom Harris