A faulty alternator causes headlights to dim or flicker, especially under high electrical loads.