This article is from the Car Audio FAQ, by Ian D. Bjorhovde (email@example.com) with numerous contributions by others.
The battery is most important when the engine is turned off, because it
supplies all of power to the audio system. The stock battery in your
car may not be up to the task of running a stereo with multiple (or
large) amplifiers if it can't supply enough current to the amplifiers.
Upgrading your current battery to a larger model may help solve the
problem because batteries like the Optima 800 offer a larger number of
cold cranking amps.
Generally, adding a second battery is great if you want to listen to
your stereo with the car turned off (and be able to start the car again
later!). This is accomplished using a dual-battery isolator: a device
which allows the second battery to be charged by the alternator, but
prevents the amplifiers that are connected to the second battery from
drawing any power from the main battery. Installing a second battery
may be done instead of upgrading the main battery.