Probably a bad microswitch. Follow your brake lever, from the underside, and you'll see a microswitch towards the end of it close to the master cylinder. That microswitch makes direct contact with your lever and turns the tail lamp on as you pull it in.
Edit: Me & Oxygen posted at same time. And my '06 S just uses one screw.