This is going to be your biggest issue while traveling to Puerto Rico. I prefer to tell you that there is no public transportation in the island better than saying is simply not reliable. If you want to go from one side of the island to another you can count on buses called Publicos, the catch with these buses is that if no one is doing the same trip as you, you will have to pay your ticket and the ticket of all the people who is not getting in the bus in order to make the trip sustainable. Your other choice may be taxis. Going from one side of the island to the other might be a trip of a $100. Your safest and cheapest option when it comes to transportation might be renting a car. I suggest to meet up with locals since roads on GPS are always tricky, even for us.
Be ready to spend a little unless you find a Couchsurfing host or an AirBNB deal. In Puerto Rico there are not many cheap lodging options. The cheapest you might find the night is for $60 and the few hostels we have around are not close to anything. So that will take us to the transportation issue once again.
To most of the landmarks in San Juan and the coast, experience them by yourself become reliable and they are not really dangerous (unless is a Beach Sport, that has its own risks you might consider). In case you are willing to visit the caves in Arecibo or Camuy or El Yunque Rainforest you should consider taking proper equipment to get inside (flashlights, appropriate shoes, ropes…) and I would recommend getting a tour or going with some locals, once again.
In general, Puerto Rico is not the most dangerous place you might find. There are security measures you need to take that apply to everywhere you go by yourself like not leaving your valuables unattended, not carrying large amounts of money or your passport with you every time, being aware of your surroundings and not going out late at night to places too dark or walking by yourself in lonely roads. I guess those are the normal tips everywhere.
San Juan has a nightlife suitable for everyone. Once you have found out which place you would like to visit, you can go out and have fun anywhere following these tips. Of course, these also apply for activities during daytime. Beaches are also a really safe place and as I told you before, do not leave your valuables unattended while going to the water.
In conclusion, I would say Puerto Rico is not necessarily the best place for any solo traveler but not exactly the worse. With good scheduling you might have a great time. Anyways, if you are willing to do this, this is my most sincere advice for you to make the most out of your visit. I am sure you will fall in love with the sight of the island.