I connected ours to a cigarette lighter fitting. We
plug into it to charge our telephones during the day when the
solar panel is putting out lots of charge and the
batteries don't need it.
As for using it for an anchor light, a much better idea is to get a portable anchor light with a light sensitive switch, so it comes on at dusk and turns off at dawn.
We hang ours above the boom while on the hook. Simple solution that minimizes
electrical usage.