If my circuit logic is correct, then this should work, more over I forget when the voltage comparator turns ON and turns OFF. So the LED might turn ON when the bulb is operating or turns OFF.The output of LM339 is open-collector, there by I use the pull up resistor on it.
Added after 1 hours 5 minutes:
I see a problem in your circuit, your circuit will not work for a long duration of time, because transistor will get over heat due to thermal runaway effect.
First, there is a short between Vcc and ground, as you can see in the below diagram.This will overheat the transistor and burnt it up very quickly, when the transistor gets on.
Secondly, if I calculate the collector current, then Ic=Vcc/RL = 24/0 = Infinity, since no resistance is present. So if I make the load line of the transistor BC238, which will look some what like this:
The collector resistance, determines what maximum current, you want through collector PIN of transistor. One point of the line is set by 24V and other point is calculated with the above formulation. So the transistor is showing this behaviour.
the maximum safe collector current is around 100mA, but you have exceed this limit.