This is a common problem that in my short time on this forum has come up a number of times. The likely remedy is to replace the brake light switch, which entails removing the panel beneath the steering wheel and busting out the old brake light switch, and then replacing it. This is assuming that you've made sure the bulb sockets are in good contact with the circuit board on your taillights. I did this about 2-3 weeks ago.
If you do a search on this site you'll see that this is a common problem, and get all hte advice you need. Pelican Parts website has a photographed step by step of this.
I found it a bitch to do b/c I'm a big guy and it's a small space under there, but it's technically very easy.
Have fun. :P
98 328i, black/black, manual, canadian sport pkg, ECIS intake, koni sport adj's, dinan springs, oe/oem clears.
Considering: tms shark,M 17" wheels, larger sway bars.