Numerous factors can cause your headlightsto flicker while driving. Most commonly, these problems could be common issuesrelated to headlight bulbs, the failure of the alternator to start, and even aweak battery. However, if all those items are working fine, then you shouldinspect the light sockets, switches, wiring, and relays. Worn-out switches,loose connections, and burnt sockets and relays can also cause intermittentbreaks in the power supply. In some cases, the cause of flickering could be failed communication between your car's computer system and the headlights. You will need error code canceller capacitors or anti-flicker capacitors in cases like these. Both of these are simple pieces of equipment of the car, which essentially translates the miscommunication between the headlights and the car’s computer system. With the help of the capacitor, the car’s computer system will stop recognizing the LED lights as a fault, thereby bringing the flickering to a halt.