Visitors to Costa Rica should exercise due caution. It's not safe like your neighborhood, but safe like the neighborhood a few miles away from yours where you wouldn't want to travel alone at night, and might not want to flash too much cash or jewelry.Like any Latin nation (or New York), beware of pickpockets, purse snatchers, muggers and car-jacking. Protect your valuables by keeping your good jewelry at home, using a money belt or necklace, and keeping to well-lit areas, even when traveling in pairs. Don't leave valuables in plain site in your car, and if you find your tire(s) slashed, don't pull over until you know you're somewhere safe.
It's really not a dangerous place, per se, but a nickel of caution is worth a colón of regret... that's the local currency, in case my lackluster joke didn't make sense.
Knife muggings and rape are not uncommon, and there's no national military. Like almost any nation in the world, the police are less ethical than they are in the states.
Also, beware that pedestrians don't have the right of way, so keep your wits about you and avoid driving at night, especially in unfamiliar places.