AH yes! Welcome to BMW ownership. This is a very common problem. First-do you have aftermarket taillights? If so they may be crappy ones and "throwing codes" as you're seeing on your OBC.
I had to change my brake light switch. This resides under the dash area by the brake pedal. There's a do it yourself on pelicanparts website. It's easy, but a real bitch because there's not much room under there. You have to break the old switch out, and then really jam the new one in there. I actually had to shave a little of the plastic off of the new one to get it in there.
Before doing this you should check that the bulb sockets are firmly in place in the taillight, and that the contacts are clean. it's likely not the bulbs.
PM me if you have any questions and good luck.
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.