The big three-
Your headlights dim when the stereo pulls too much power out of your car's electrical system. This usually happens only in large, multiple-kilowatt sound systems. But sometimes even modestly powered systems can stress your car's electronics, especially during a sub amp's burst of energy when it produces the sound of the beat. Every part of the electrical system suffers because of the amp's sudden demand on the limited supply of power, even the amplifier itself. Your eyes are just more sensitive to the change than your ears, and you notice your headlights dimming along with the beat.
There are a few actions you can take to solve this problem. There are also some strong and differing opinions about the order in which you should do them, or even their individual usefulness. The following is my contribution to the argument.
Check all power and ground connections, and the battery itself
The first thing you should do is make sure all the surfaces used in power and ground connections are scraped down to bare metal, clean, and all the connectors fastened tightly. If that doesn't do it, take your car and have its battery load-tested at an auto parts or battery store. They'll often do it for free and can recommend the proper replacement if they find your old battery has problems. Car batteries rarely live to be four years old, so don't think you're being ripped off when they tell you your old battery isn't holding its charge. A weak battery can often have enough juice to start your car but not be able to handle the quick jolt of demand when your sub amp hits.
T-Spec 3.0-Farad
capacitor
Capacitors
Adding a capacitor to your system does not increase your system's power capacity. But if your lights dim only occasionally, and only on the loud drum beats, then a capacitor may just be the cure. A capacitor smoothes out the power demands by providing a short burst of energy when needed. I recommend 2 farads of capacitor for every 1,000 watts RMS of total amplifier power. That's more than the usual recommended dose, but it should ensure a quicker recovery time for the cap to be ready for the next thump.
Kicker 4-gauge power wire
The Big Three wiring upgrade
A good, cost-effective improvement is to perform the "Big Three" electrical upgrade. This will vastly improve your vehicle's electrical system, allowing more current to flow easier to all components. This upgrade replaces or augments three key cables in the electrical system with 1/0 or 4 gauge wires: the battery ground to chassis wire, the chassis to engine block wire, and the alternator plus to battery plus wire. This increases your electrical system's current flow capability, ensuring a more consistent voltage under varying demand conditions.
An unfortunate possible side effect of doing the Big Three is that occasionally it only makes your lights dim even worse. This happens because the amplifier is now able to suck juice better from the system through the bigger straw (the new cables).
High output alternator
The alternator is the ultimate source for all of your vehicle's power when it's running. The battery starts the engine, but the alternator takes over when the motor starts to turn. If your sound system demands more power than your stock alternator can supply, then you will benefit by upgrading to a higher output alternator. Replacing your stock alternator with an "HO alt" may seem like an expensive solution, but if you've invested in a sound system that draws this much power, you shouldn't mind solving this problem of supply and demand by increasing the supply of power.
For example: producing a 1500 watt output requires about 217 amperes of current from your car's system. It's actually about a third of that for music, which doesn't put out full power all the time ? but it's still a lot of current. Most stock alternators are in the 80-120 ampere range and can only supply about 40% to 50% of that for non-automotive uses like amplifiers. A 250 or 300 ampere aftermarket high output alternator should provide enough power for all your car's systems and your high-powered stereo too. Keeping that in mind, calculating the required output size of a high output alternator is not easy and should only be done while consulting with the new alternator's vendor or installer.