Electrochromic materials change their optical properties through a redox reaction. When a voltage is applied, ions move in and out of the electrochromic layer, causing a change in its oxidation state. This shift alters how the material absorbs and reflects light, leading to a visible change in color or transparency.