The insert above the LED diagram shows the electron in the diode going from a lower to a higher energy level by absorbing the input energies, and emitting light energy as the electron returns to its lower energy level.