Fact 1: a generator converts kinetic energy into electrical energy. 
Fact 2: Electrical energy is converted into light energy in the headlights.
A generator converts kinetic energy into something that is converted into light energy by headlights.