Can I safely power a three-prong electrical device from a light socket?
If you're talking about an E26 lampholder (the medium screw-in base widely used in the US), there are only two electrical contacts: live is at the back of the lampholder and neutral is the screw thread.  While the light fixture itself should be grounded, it's not available via an adapter.

In an outdoor situation, ground protection is even more important than indoors; if your exterior circuit also includes exterior receptacles, it should already be covered by a GFCI.  As I said in an another answer, that breaks the circuit if there's a ground fault, but without a ground connection, any current is going through you to ground, instead of through the ground lead.  So no, it's not safe to use a two-prong to three-prong adapter and leave the ground on your lights disconnected.

I have seen exterior light fixtures with a grounded electrical outlet built into them; if you were able to change the light fixture, that would be the safest way to go.