I was playing with various things about my tail/brake lights (experimenting with LED replacement bulbs) when i had the same problem. I discovered by accident that the brake light did come on even with the headlight on, but it was very dim. I imagine the headlight drew a lot of current and it was competing for brake-light current..
The brake light got slightly brighter when i revved up the motor.
Before trying to fix things, it would help to know if the brake light socket is getting any power or that it is completely dead. Dead means a wiring, connection or switch problem. Faint light but some power means something else.. but i admit i'm not exactly sure what it could mean.. Is your headlight a higher wattage replacement or original equipment?