Many of the nations have rules against anchoring in coral
as mentioned (obviously not in swimming areas, marked channels, etc as well) Other than that:
You'll find a lot of uninhabited islands in the Bahamas. I'm not aware of any other anchoring restrictions. There are places you can anchor
for days and not see another boat. If uninhabited islands are your thing, spend a lot of time in the Bahamas.
I know some Caribbean locations restrict anchoring and require you to pick up moorings. In the SVIs, unexploded ordinance is one reason you are encouraged not to anchor in some places, which I find a quite compelling reason.