A molecular switch is a molecule that can reversibly shift between two or more stable states in response to external stimuli, such as light, pH, or electric fields. These switches are crucial in biological systems for regulating processes like signal transduction and are also being explored for applications in nanotechnology and smart materials.