Orach Chaim 227
Reb Shlomo Zalman writes that one can recite a Bracha on lighting even if the bolt is not seen; but only the light is seen.
If the sky cleared up, and new clouds gathered to create more lighting and thunder, the Halacha is that a new Bracha should be recited. However, if the storm carried on from one day to the next, a new Bracha can be recited on the same storm the next day. A new day regarding this Halacha is morning, and not night time.
These Brachos can only be recited within three or four seconds. After a delay of this amount of time, a Bracha cannot be recited. The three or four seconds is the amount of time it takes someone to greet their Rebbe.
There is a discussion among the Poskim if this Bracha should be recited if one is in the middle of Birchas Hamazon. It would seem that one should not interrupt Birchas Hamazon to recite these Brachos. One may interrupt learning in order to recite these Brachos.

