The brake light comes on for three reasons.
#1 low on fluid
#2 parking brake set
#3 a brake line snapped and grounded the thing on the master cylinder, which completes the circuit and lights the light on the dash
Otherwise of course an elerical problem could cause it