2 things I would look for. Alternator as previously mentioned, and grounds.
Basic alternator test is to connect a multimeter to the battery while the engine is running. The voltage should be about 13.5-14.2v. Turn on the headlights to see if this value drops. If it falls out of range, your alternator is bad.
Second thing is bad grounds. When there isn't a good ground, electrical components will follow any route they can to find ground. Start with the battery, make sure the connections are tight and clean. Follow the ground (black) wire, it should go the body or engine. Make sure this is good and tight. Look around the engine wiring harness, there should be several places where it connects to the body. Make sure these are good. Lastly, check around the ECU and any other body control modules you may have. You may want to find a schematic for your car to help find the grounds. You will also be able to see the headlight circuit to see if it interferes with anything else (which it shouldn't).
Another thought. If you only turn on the tail lights (1 click), does it have the same effect? If you pull the headlight fuses and turn on the headlights, does it have the same effect? Wondering if there might be something weird going on in the headlight switch or someplace else in the circuit(tail lights, dash lights).