As long as there is not a photocell to turn them on and off, the lights will
work fine either way.
However, it is safer done properly. It is like the polarized plug on a
lamp; it will work backwards, but you are more likely to get a shock off it
when plugged in backwards.
For $3 you can buy a voltage sensor that looks like a screwdriver. Touch
the blade to the wire and your finger to the knob on the end; if the wire is
hot, it will light up. It is dim, so you can't use it in full sunshine.
(more expensive devices are much better, but I suspect you don't want to
With the switch on, but no bulb in the fixture, the hot (black) will light
up, but the neutral (white) will not.
Or, even simpler, with the bulb out, the threaded sleeve will not light up,
and the knob at the back will. If they are the opposite, you have the
fixtured wired backwards. The safety angle is that you are more likely to
touch the sleeve than the knob.