Opals: Natural Band Gaps for Photons
Periodic objects reflect incident waves when the wavelength and interplanar spacing satisfy Bragg's Law. Under these conditions waves do not penetrate very far and are reflected from the object. Usually this happens for X-rays in crystals, but crystals can also diffract electrons creating a similar effect. In semiconductors diffraction dominates whole ranges of electron energies and creates a band gap. Electrons with energy in the band gap are forbidden inside the semiconductor crystal. In fact that is why a semiconductor does not conduct.