If it's an older Bandit model, the tail-light bulb is a dual filament type that has both brake, and tail-light functions.
One filament can break, or burn out, leaving the other still working.
I'd replace the bulb, anyway.
If that doesn't work....the socket could be a little corroded, or dirty, or bunged up.
The bulbs are pretty cheap, so it makes sense to carry a spare.
Try a new bulb, if that doesn't do it, try cleaning the socket with some WD40, or contact cleaner. You can also wiggle the bulb a bit to see if the sockets a bit worn.
Chances are, just a new bulb will do it, and/or a little cleaning.