A majority of the deaths occurred in the western state of Rajasthan, where 11 people died after being struck by lightning near a watchtower at the 12th century Amber Fort, police said.
Srivastava said at least nine more people were killed and nearly 20 others were injured in separate lightning strikes when the state was lashed with thunderstorms and monsoon rains.
In Uttar Pradesh, 18 people were killed by lightning on Sunday, said Manoj Dixit, a government official. Most of those killed were farm labourers working in fields.
Both state governments announced financial compensation for the families of the victims and those who were injured.
The India Meteorological Department has warned of more lightning in the next two days.
Lightning strikes are common during India’s monsoon season, which runs from June to September.
More than 2,900 people were killed by lightning in India in 2019, according to the most recent official figures available.