As I understand it a LED emits a photon when an excited electron falls back to a lower orbit, and this is always the same energy (read: wavelength). So then why is the spectrum of a LED a bell-shaped curve instead of just a line (maybe a couple of lines for different electron transitions)?
Several reasons. Without getting too deep into quantum mechanics, the main reasons are:
- If the LED isn't at absolute zero temperature, its atoms are vibrating. The semiconductor allows longitudinal and transverse waves of many wavelengths, all going at the same time in ways described by thermodynamics. These are quantized, like anything else, and called "phonons" The energy and momentum of phonons interact with the usual antics of electrons and photons. You get a spread of photon energies coming out.
- Even if a phonon doesn't exchange energy/momentum with an electron or photon, just because the crystal lattice is moving you get a Doppler shift in the emitted light.
- Heisenberg says you can't measure both energy and time intervals with ultimate precision. This isn't really about measuring but generating photons of a specific energy. An electron is excited to a higher state, then comes back down. To have a perfectly precise energy change in a quantum system you must allow it an infinite time interval to establish the initial, intermediate and final states. Waiting that long would make for a dim LED! Photon generation processes in real LEDs take place quickly, on the order of picoseconds or nanoseconds. Emitted photons will necessarily have a spread of values.
- While the semiconductors used in electronics components are very pure, with carefully controlled amounts of dopants added, they're never perfectly pure. There are undesired impurities, and the dopant atoms we do want, are distributed randomly. The crystal lattice isn't perfect. The exact energy levels an electron can choose from are varied and dependent on position. An ideal semiconductor has well defined bands of allowed energies and forbidden energies. In an imperfect semiconducture, these have fuzzy edges. So you get a range of wavelengths for emitted light.
I haven't yet mentioned effects of electron and nuclear spins, or that different isotopes, having different masses, add to the imperfection of the crystal lattice. You can imagine why we physicists have a wild good time studying the details of spectra of light from glowing materials.
I guess that the orbit fallback energy is not strictly constant, but depends (a little bit) on the neighbourhood of the atom, for instance how exactly it fits in the grid, location of nearby impurities, if atoms of various isotopes are involved teh exeact isotope of the atom, etc.
In addition to what others have said, LED housings (the clear plastic bits) are doped/mixed with phosphors that absorb some of the light, then remit the energy at their molecular resonances (read: their color). Phosphors need not be simple molecules or mixtures, either -- they will emit several energies in varied intensities, depending on the incoming photon energy and intensity, crystal orientation, mixture concentration, etc..
In line with what the others said, photons generated by an LED go through quite a few atoms to get to your eyeball or detector, transferring energy countless times, making the Fermi distribution (quantum energy description of a discrete system) quite a bit more Gaussian (macroscopic description of real measurements).