India is a fairly safe place for travelers but you should practice extra vigilance during your trip, particularly in cities. Petty crime like pickpocketing and bag snatching is fairly common, so be sure to pay close attention to your belongings and keep your valuables in a safe location to avoid pickpockets.
Travelers have also had their drinks and food spiked in hotels, restaurants and bars, particularly in smaller establishments. Never leave your drink unattended, don't accept food or drinks from strangers and above all, trust your gut.
Sexual harassment of women is unfortunately quite common in India, for both locals and travelers. For tourists, this mostly consists of staring and unwanted attention. It's important to do your research on the locations you're planning on visiting and transportation methods, as sexual harassment is more prevalent in some areas than others. Generally speaking, it's best to dress modestly and avoid going out alone at night.
Finally, some areas of India, particularly Jammu and Kashmir, are prone to violence and conflict. Be sure to do your research on current issues in the country while planning your trip.