There are a number of reasons this could happen improper seating of the pads/shoes or air in the brake line
This is the first sign that the brakes are going, they may need to be replaced, but they may be able to just turn the rotors and you can still get alot of good use out of them
brake switch located on the top of the brake pedal
you still have air in your lines
Check for vacuum leak at brake booster
You may want to start with the brake fuse. If you still have turn signals and lights. you may also want to check the brake electical relay switch in the relay box Check as well the brake switch located at the brake pedal.
Sticking Brake LightsI had this very same problem when I owned a Nissan 300zx. There is a switch in front of the brake pedal that when the brake pedal is pressed the metal part of the pedal presses down on a little button which turns the brake lights on when pressing the pedal. What I did was I got under the dash, took a flashlight and put a little piece of tape in between the pedal and the switch. It acted as a cushion because the pedal wasn't pushing down on the switch as it was pushing on the tape and when I pressed on the pedal the lights would come on but the tape pushed the pedal back to shut the switch off. If you want to avoid all this consider having your brake pedal adjusted. If your brake lights come on still consider having your cars wiring checked out.
faulty brake light switch (on pedal)
It turns the rear brake lights on as a safety feature. The brake pedal is pushed in, causing the fluid to move forward in the brake cylinder,activating a brake light switch. Even if the vehicle is off, the lights will still come on.
it sounds like to me that your master cylinder might be bad
the brake switch at the pedal is stuck or out of adjustment.
Did you check the switch on the brake pedal assembly?
more than likely its your brake switch on the brake pedal. pull up on the brake pedal and see if it goes off. if it does you need a new brake switch if it doesnt you might be able to adjust it. if adjusting it doesnt do it your still going to need to replace the brake switch.