Just returned from Costa Maya and Belize. You are fine if you stay in the shopping villages created for cruise tourist. Belize city is very much a third world city outside the port area. There is no need to venture out into the city itself since there isn't much to see or do. Take a shore excursion if you wish to see the country. I did twice and saw plenty of the "real" Central America from the bus window.
Costa Maya is a lovely shopping and bar/restaurant area and nothing else. It is very much worth a look-see, IMHO. 8) There are armed security guards around so safety shouldn't be an issue. Again... like Belize, if one wishes to see the country, take a shore excursion.