My best guess is that was an all-around white anchor light, missing the bulb, socket, and dome. If you plan to anchor out overnight, it would be good to get it fixed or replaced. It could be something like this, or similar:
Aqua Signal All-round White
You could get a portable anchor light that you hang from your rigging instead, but at a minimum you should protect that element/wiring from the weather.