In Chandauli, Iftekhar Khan (32) and Begum Asmat (45) - teachers at Al-Tauhid Madrasa - died in the incident, Superintendent of Police Amit Verma said.
Seven others, including teachers and students of the madrasa, were injured.
The injured were admitted to a nearby hospital, where their condition is stated to be stable, he said.
In Bhadohi, two persons including a policeman, were killed after being struck by lightning.
Constable Subhash Chowdhury (40) and Shubham (14), of Mahuwari and Arjunpur village respectively, died in the incident.