The General Rule
India is conservative but modernizing.
Metro Cities (Delhi/Mumbai/Bangalore): Modern western wear (Jeans, T-shirts,
Dresses) is perfectly fine.
Small Towns/Religious Sites: Be modest. Cover shoulders and knees. Avoid deep
necklines.
For Women
Carry a lightweight scarf (dupatta/stole). It is the most versatile accessory. You can use it to cover your head in a temple, protect yourself from the sun, or modest-up a t-shirt in a conservative area.
For Men
Shorts are fine for casual sightseeing, but long trousers are preferred for temples and fine dining. In business settings, a suit or formal shirt is standard.