In general, whenever you're traveling in an unfamiliar country, stay alert. The residents of San Pedro realize that the island's livelihood depends on the goodwill of its tourist (the mainstay of its economy), so crimes against visitors are rare. In any case, don't take walks in unfamiliar areas at night, safeguard your possessions and never leave items unattended.
