LEDs (light-emitting diode) are diodes that convert a forward current into light. They’re made of a semiconductor material other than silicon, because it has no ability to release light and can only take in light and release power.
The idea is that an external circuit provides electron holes. The diode produces photons when electron holes recombine. The colour of the LED is dependent on the band gap of the pn junction.
This is actually why the blue LED was so difficult to discover. The band gap was much larger than the red/green pn junctions so a good material choice was difficult.
LEDs find significant use in hardware circuits. One key example is in fibre optics, where LEDs (or laser diodes) produce light and photodiodes detect light.