If you could carefully measure the voltage between two points in a beam of light, you’d find that it oscillates over time; the frequency f of this oscillation (how many times per second it oscillates) determines the color of the light, and the strength of the oscillation (the maximum number of volts you measure) determines the intensity of the light.