Assuming that you don't "top-up" your brake fluid, if it's at the full level when you put new pads in, as the pads wear, the level in the reservoir drops. When the pads are almost completely worn, the amount of fluid that's dropped down from the reservoir is designed to be enough to trigger the light.
Edit: The above was to explain the question regarding how pad wear related to the light... of course low fluid, the ebrake switch, or the floater for the indicater being stuck could also cause the light to come on.
Incidentally, how the heck did a thread about the brake light become so long?
Just 'cause it's an [!] that light's got a bigger ego than any of the others.... ohh look at me, I'm important.. I'm a freaking exclamation point.