When anchoring in the dark, it is very difficult to be sure of the vessel's exact position. On several occasions I have anchored in bays only to find in the morning that I was much further away from the shore than I expected.
An easy solution is to pre-plot a fix using some lit objects. By placing the boat on one of the bearings of the fix, it is easy to manoeuvre until the other bearing is correct, then anchor on that point.
This same principle can be used in daylight when anchoring in a bay where they are underwater rocks marked on the chart, a situation that is fairly common in the Channel Islands or the Isles of Scilly.
Sailtrain.co.uk is free to use, but if you feel you would like to contribute to the running and development costs you can donate via Paypal: