Downshifting binary signal from higher to lower voltage using an LM339 comparator
The comparator is "open collector" meaning it cannot source current, it can only sink current. 

If you flip the LED and connect it (with the series resistor) between the output and +3V you should see it work (assuming it's a red LED) if the inputs are biased correctly (and they are not). 

Your test is not respecting the common mode range of the inputs- you should ground pin 6 as well as apply the (isolated) test voltage between pins 6 and 7. You cannot apply a negative voltage (don't flip the input polarity or you'll kill the chip) wrt ground (-300mV is absolute maximum wrt ground). 

You cannot expect it to function properly with input voltages exceeding the supply voltage minus 2V or more, so with a 3V supply you should not apply less than -300mV or more than 1V to any input for proper operation. 

If you want to compare a 24V signal you could use a supply voltage of 5V (the minimum recommended), generate a (say) 1V reference with a divider and divide the input signal down to (say) 0V/2V for on/off. Pull the output up to 3V and you'll get a 3V compatible output. 

Or just use a transistor/diode and a few resistors as Ignacio suggests! Or use an optocoupler with a couple resistors to be very safe.