LEDs are made in direct-bandgap materials where recombination
results in a photon emission. They are PN diodes still.
Silicon PN diodes will emit light. I saw this on my first power
MOSFET driver when I used the wrong type of diode in the
high voltage clamp. Immediately followed by said diodes
launching out of their insulating tubs and bouncing off my
face as I peered through the probe station microscope.
The diode was reverse biased and breaking down. The light
may have been incandescent.