Why were the cabin lights turned on during the flight?
Most likely to keep the passengers awake and alert in the even to severe air turbulence, unusual attitudes, or even a mishap which might be encountered during the passage through those areas of storms.  Awake and alert passengers can better react and avoid injuring themselves and/or others.

It's the nice form of the captain coming on the intercom and saying:

"Good evening ladies and gentlemen.  We are about to pass through an area containing several red cells, possibly hail, and severe turbulence.  If you don't feel like having your head put through an overhead bin, wake up and get those seat belts fastened - NOW!"