These small devices glow when electrified. They work, like most electronic devices, by virtue of the magic smoke which is sealed inside them at the factory, but (as usual) the wicked scientists have (in their blind ignorance) provided their own explanation for us to scoff at.
They claim that the light emitted is caused by the interaction of electrons and 'holes' at the junction of P and N-type semiconductors inside the diode (the junction which allows a diode to act as a 'valve', conducting electricity in only one direction).
It is interesting to note that the color of this light depends on the design of the LED, and that it is produced in a very narrow band of the spectrum, not the wide range of simultaneous frequencies emitted by other light sources such as bulbs. The observed color, therefore, can not easily be changed by filters. It is also interesting to note that red LEDs use gallium arsenide, which has appeared elsewhere in Transformers lore.
Uses in Transformers
LEDs are used in the Laser Rods (to provide the 'laser' glow to their weapons), on glowing eyes of toys such as Cybertron Primus, and wherever you need a little bit of light. Lights are cool, especially LED's, which produce little excess heat (which is good for the toy's plastic).
The heat advantage comes with an efficiency advantage over other light sources, which lets the toy's batteries last longer, to the delight of parents everywhere. Collectors don't care because gimmicks are for babies.
- How Light Emitting Diodes Work - Brief explanation of the heathen science involved.