Like many port towns, drugs are part of the scene. At any given hour you'll likely run into a few guys that are "trippin". They are mostly harmless. Just give them some extra room to avoid contact. Do not leave your car parked, unattended over night. Make sure you have secured parking with your hotel/(place you sleep) dude.
Just remember when you are just about anywhere on the Pacific Coast of Nicaragua that you are a long way from good medical attention. San Juan has a few doctors and a health clinic. Keep that in mind as you travel in these regions. You need to go prepared for all scenarios for rescue, first aid and transport to the hospital in Rivas.
I used these guys to repair some damage to my surfboard. I show up to pick it up and they have lent my board to one of their buddies who is teaching someone to surf 15 KM away! I have to take a kid from the surf shop up to the beach to find this guy and then they don't want to give the board back.
Also very unreliable and hard to track down with questions. Others in San Juan del Sur have had boards stolen and then they mysteriously bump into the new owners at the beach who advise they bought the boards from Arenas Calientes.
These guys need to switch back to Pepsi!
The town is quite safe. It is totally safe to walk alone during the day. After dark one can walk with one other companion as long as it is not too late. After 10 or 11 o'clock, one should be in a group or with a local person.