Lightning, provides light.
We notice lightning more at night than we do during the day.
Since lightning is a light source that provides light very briefly, it illuminates what is within the distance/range of the lightning for a split second and then, when the flash of lightning is gone, what we saw with the addition of lightning is not readily seen.
This is what our flash does, except we can control the flash.
We can control “the “time of day” the flash occurs with the tonality of our picture.