Photonic crystals are structures with periodic variations in dielectric constant, which affect the motion of photons in a similar way that the periodic potential in a semiconductor crystal affects electrons. They are used to control the flow of light and can create band gaps where certain wavelengths of light are prohibited, leading to efficient light guides and waveguides.