>>7022212They're simply pn junctions in foward bias, different colors requires the appropriate energy bandgap between the valence band of the p type and the conduction band of the n type semiconductor such that the desired wavelength of light is achieved when the electron de-excites from n to p. The LED revolution only really came about after some nips managed to invent blue LEDs to complete the RGB trio, which in turn allowed for white LEDs and LED display panels.
Incidentally, low cost solid-state lasers like in your laser pointers are also just LEDs but with a mirror/polished surface to achieve the laser effect