According to Could We Harness Lightning as an Energy Source?:
An average bolt of lightning, striking from cloud to ground, contains roughly one billion ($1,000,000,000$) joules of energy.
According to Visible light:
Red photons of light carry about $1.8$ electron volts (eV) of energy, while each blue photon transmits about $3.1$ eV.
So let's take an average photon energy of $2.5 \text{ eV}$.
Then weAssuming all the energy of the lightning is converted to visible light,
we can calculate the number of photons in the average lightning.
$$ N = \frac{10^9 \text{ Joule}}{2.5 \text{ eV}} = \frac{10^9 \text{ Joule}}{2.5 \cdot 1.6 \cdot 10^{-19} \text{ Joule}} = 2.5 \cdot 10^{27}$$