Much of what is discussed here is common sense. Although most tours and activities are safe, there are risks involved in any adventure activity. Know and respect your own physical limits before undertaking any strenuous activity. Be prepared for extremes in temperature and rainfall and for wide fluctuations in weather. A sunny morning hike can quickly become a cold and wet ordeal, so it's usually a good idea to carry along some form of rain gear when hiking in the rainforest, or to have a dry change of clothing waiting at the end of the trail. Be sure to bring along plenty of sunscreen when you're not going to be covered by the forest canopy.
If you do any backcountry packing or camping, remember that it really is a jungle out there. Don't go poking under rocks or fallen branches. Snakebites are very rare, but don't do anything to increase the odds. If you encounter a snake, stay calm, don't make any sudden movements, and do not try to handle it. Also avoid swimming in major rivers unless a guide or local operator can vouch for their safety. Although white-water sections and stretches in mountainous areas are generally safe, most mangrove canals and river mouths in Costa Rica support healthy crocodile and caiman populations.
Bugs and bug bites will probably be your greatest health concern in the Costa Rican wilderness, and even they aren't as big of a problem as you might expect. Mostly, bugs are an inconvenience, although mosquitoes can carry malaria or dengue. A strong repellent and proper clothing minimize both the danger and the inconvenience; you might also want to bring along some cortisone or Benadryl cream to soothe itching. At the beaches, you'll probably be bitten by pirujas (sand fleas). These nearly invisible insects leave an irritating welt. Try not to scratch because this can lead to open sores and infections. Pirujas are most active at sunrise and sunset, so you might want to cover up or avoid the beaches at these times.
And remember: Whenever you enter and enjoy nature, you should tread lightly and try not to disturb the natural environment. There's a popular slogan well known to most campers that certainly applies here: "Leave nothing but footprints; take nothing but memories." If you must take home a souvenir, take photos. Do not cut or uproot plants or flowers. Pack out everything you pack in, and please do not litter.