How does the LED works?

A LED is two-lead semiconductor light source that is, specialised form of PN junction that uses compound junction. The commonly used compound semiconductors including gallium arsenide, gallium phosphide and indium phosphide are used in LED. Junction made from these materials are emits light.

The LED light once it is forward biased. Once voltage is applied across the junction to make a diode  forward biased current flows in the PN junction. Holes from p-type region and electrons from the n-type region enters the junction and recombine like traditional diode and enabled the current flow. Because of this energy is released, some of the energy is released in form of light photos.

The study has found that most of  the light is emitted from the region near the p-type junction of semiconductor. As a result design of the diode is made in such a way that region near the p-type junction is kept as near to the surface of the device so that  we can make sure the minimum amount of light energy is absorbed by the structure itself.

The produced light energy from the junction must be optimised  in the right material. Pure gallium arsenide  release the energy in the form infra raid  portion of spectrum. To bring the light emission in the  visible red end of the spectrum aluminium is added to the semiconductor to give aluminium gallium arsenide.  Phosphorus is also can be added to give red light. For different colours different materials are used. For example to show green color gallium phosphide is used. For yellow and orange colour  aluminium indium gallium phosphide is used.