LED is a p-n junction diode. A p-n-type semiconductor is formed when a p-type semiconductor is properly connected with an n-type semiconductor. A p-n junction is a name for the contact surface. Diffusion of particles in a p-n junction diode results in the creation of a depletion region and a potential barrier that hinders further particle flow.
The dispersion of charge carriers occurs in LEDs. The P side's holes and the N side's electrons combine to produce energy in the form of heat and light. Only when there is a forward tilt is this possible.
The external voltage is provided across the P-N junction in forward biassing, which bypasses the potential barrier. On the N side, a negative voltage is applied, whereas, on the P side, a positive voltage is applied. Free electrons in the conduction band merge with holes in the valence band when this happens in LEDs. As a result, energy is emitted.