some more electrical gremlins

when i tap my brake pedal all the lights on my car dim for a second then back to normal. im going to assume i have a bad ground. but why does it only do this when i tap the brakes? shouldnt i have the same effect from flicking on my highbeams or something else that draws alot of power?