Output of LM393 won't swing LOW unless it is pulled up with a LED
Without the UV LED dropping about 3V, the voltage at your non-inverting input will never drop below your reference at the inverting input unless your input drops below about -1.1V - so as a result the output will never swing low.  

With no LED there and the input grounded, simple voltage divider calculations show that the non-inverting input voltage will be 4.89V (greater than your 4.24V reference).
With an LED dropping 3V and the input grounded, the non-inverting input voltage will be 3.67V.  

You either need a much larger value pullup resistor, or much smaller Ri and Rf resistors for your circuit to work as intended.