If you need to exactly-choreograph the lighting, it needs to be done manually (or semi-automatically), or the lighting program needs to be programmed into the same computer as the music, so that it can be synchronized.
There is standard for theatre lighting control called DMX
. You can buy DMX controllers and DMX lighting, but I've never used it and I'm not sure how easy it is to duplicate the protocol (or something similar) with a microcontroller.
You can make the lighting respond to the music automatically, say... flash to the beat, or flash/sequence faster as the music gets louder, etc. But, you can't really count on the lighting doing the exact same thing every time the same music is played. For something like that, you can run the sound into an analog input (perhaps first through an amplifier, precision rectifier, filter, peak detector, etc.).