Peru is safer than it has been in years, but standard travel precautions apply. Remember: you represent enormous wealth to the typical person here; the budget for your trip might exceed what many Peruvians earn in a year. Conceal your valuables, watch your things, avoid deserted streets, walk purposefully, take taxis at night, and be vigilant if somebody invades your personal space, or if there is a scene of commotion, either of which may be done to distract you. Bag slashers and pickpockets tend to work in markets and on buses; keep track of your valuables in any crowded place.
In terms of health and sanitation, few visitors experience anything worse than a bout of traveler's diarrhea. If you stick to upscale eateries in well-trodden destinations, you may minimize even those problems. Be wary of raw foods (peel your fruit!), and don't drink tap water. If you visit the Amazon Basin, you should get vaccinated against yellow fever. Check with your physician about any other pretravel immunizations or medications at least a month before you leave, since some vaccines require multiple injections.