your hum is caused by mains powered light, 60Hz on and off your comparator is very good at comparating that hence 60Hz hum on your circuit.
solution 1:
i did almost exact problem as this one, so here it is, the "quick unproven but working" solution (see attached picture), the key is a diode and capacitor, you may skip the drain 10Mohm resistor. the hum will be reduced from few KHz BW to about 1Hz (on and off in one sec acceptable for my app). but better solution esp for your case will be to use 555 timer on the comparator output and probably some logic circuit, ie when comparator is off, you delay the on condition for a certain amount of time depending on your choice. i didnt use this better solution since i was really tight on space and components count, so i used the minimalistic acceptable solution earlier mentioned.
solution2:
point your photocell to a direction that less likely to be hit by artificial light.
solution3:
use multiple photocell that sense every different direction and use logic AND to turn the light ON, the probability of hum and false OFF will be lower. the only condition thats surefire to trigger all condition TRUE is during the daylight.
suggestion:
1) LM324 is not a comparator its an opamp, but no harm if you config it as comparator like your schematics. just letting you know.
2) put the 2N222 NPN on high 12V side, or change to PNP if you want to stick to that low side config (but you'll also need to switch comparator +ve and -ve input), NPN works better on high side and PNP on low side (you got them backward in your schematics). thats what my experience tells from my unproven experimenting.
someone else may give better solution as we both learning. cheers