Photonic crystals are periodic structures with a periodic variation of refractive index, creating a bandgap that restricts the propagation of certain wavelengths of light. They can be used to control and manipulate light at the nanoscale, offering functionalities such as waveguiding, filtering, and efficient light extraction.