The Blessing over thunder and lightning:
A. The blessing:
Upon seeing lightning and hearing thunder, one is required to say the blessing of “Baruch Ata Hashem Elokeinu Melech Haolam Oseh Maaseh Bereishis.” [Alternatively,] if he wants, he may [instead] say [the blessing of] “Baruch Ata Hashem Elokeinu Melech Haolam Shekocho Ugvuraso Malei Olam.” Practically, the custom of world in these provinces [i.e. Ashkenaz] is to say the blessing of Oseh Maaseh Bereishis upon seeing lightning and the blessing of Shekocho Ugevuraso upon hearing thunder.
If one heard thunder but did not see lightning: Unlike the common misconception, the blessing over hearing thunder must be recited even if one did not see the lightning.
If one saw lighting and heard thunder: If one saw lightning and heard thunder simultaneously, then one is to only say one blessing on both [choosing one of the two blessings above]. If, however, one heard thunder and saw lightning one after the other, then one is to say two blessings, first saying a blessing on one [i.e. Oseh Maaseh Bereishis on the lightning, which usually comes first] and then saying a blessing on the other [i.e. Shekocho Ugevuraso on the thunder]. [These blessings must both be said Toch Kdei Dibbur of the lightning and thunder, as explained in B.] Practically, the custom of world is to say the blessing of Oseh Maaseh Bereishis on lightning and the blessing of Shekocho Ugevuraso on thunder, as explained above.
B. Within how much time of the thunder and lightning must the blessing be recited?
The blessing which is said upon hearing thunder or seeing lightning must be said within Kdei Dibbur of hearing the thunder and seeing the lightning [which is the amount of time it takes to say the three words of “Shalom Alecha Rebbe”, which is a mere 2-3 seconds]. If one did not say the blessing within that time, then he is not to say a blessing on the past. However, other Poskim argue [and rule the blessing may be said even later]. Practically, one is to say the blessing without saying Hashem’s name [i.e. Baruch Shekocho Ugvuraso Malei Olam]. Accordingly, if one was unable to say the blessing immediately after hearing the thunder, such as he was using the bathroom upon hearing/seeing it, then he is to recite the blessing later on without Hashem’s name.
Immediately after hearing thunder, one is to say the blessing of “Baruch Ata Hashem Elokeinu Melech Haolam Shekocho Ugvuraso Malei Olam.” This applies whether or not one saw the lightning. If the blessing was not said within 2-3 seconds, it is to be said without Hashem’s name, as follows: Baruch Shekocho Ugvuraso Malei Olam.
May the blessing over lightning be said if one only saw a flash of light and not the actual strike of lightning?
C. How often is the blessing over thunder and lightning to be recited during a storm?
So long as the clouds [of that storm] have not yet become dispersed [one does not repeat the blessing upon seeing or hearing a second thunder or lightning, as] all [of that storms] thunder and lightning is exempt with the original blessing that was said. [In other words, once a blessing is said over thunder or lightning of a group of storm clouds, the blessing is not to be repeated over a second thunder or lightning of that same continued group of clouds even if many hours pass.] However, if the clouds dispersed [and then a second set of clouds returned] between the two thunders or the two lightnings, then [it is considered a new storm and] one needs to repeat the blessing over the second set of thunder and lightning.
One does not repeat a second blessing upon hearing a second thunder or seeing a second lightning of a storm, unless the sky cleared up in the interim and the storm clouds then returned.
What is defined as the clouds having dispersed?
This means that the entire sky has completely cleared up of any [rain] clouds [even from a distance], allowing the sun, moon or stars to shine, and the storm clouds then returned.
If one traveled to a different area and then returned: Some Poskim rule that if one traveled past the storm where the skies are clear and then returned to the area of the storm, a new blessing may be said.
May a new blessing be said the next day if the storm clouds of the previous day did not disperse?
Some Poskim rule that all the above only applies on the same day, however, the next morning [after awakening from sleep], one is to recite a new blessing upon seeing and hearing thunder and lightning, even if it is the same storm and the clouds from the previous day have not yet dispersed. However, from other Poskim it is implied that there is no difference between that day and the next day, and also the next day a second blessing may not be said if the clouds of the previous day’s storm have not yet dispersed. [Thus, during a storm that lasts a few days without any clearing up of the skies, one would only say a blessing on the first sighting and hearing of thunder and lightning and not anytime thereafter.] Practically, those who repeat the blessing the next day have upon whom to rely.
 Seder 13:15; Luach 12:24; Michaber 227:1; Mishneh Brachos 54a
 Admur ibid; Michaber ibid; Rambam Brachos 10:14; Rava in Brachos 59a
 Admur ibid; Luach ibid; Taz 227:1; Elya Raba 227:4
The reason: As majority of times the lightning and thunder come immediately one after the other, and people do not wish to recite the same blessing twice, one after the other, as it is better to praise G-d with more praises than to praise Him with a single praise. The blessing of “Shekocho Ugevuraso Malei Olam” was chosen for the thunder because thunder expresses more power and strength than does lightning. [Admur ibid; Luach ibid; Taz ibid]
 Pashut, there is no source or logic to say otherwise; Although, scientifically, thunder is always the result of lightning, the two are not connected regarding the blessing; that one must see the lightning in order to say a blessing on the thunder; See also M”B 227:5 in name of Elya Raba “The same applies if one heard the thunder but did not see the lightning, he says the blessing of “Shekocho Ugevuraso Malei Olam.”
 Seder Birchas Hanehnin 13:15
 Admur ibid; Luach 12:24; M”A 227:1
 Admur ibid; Luach ibid; Elya Raba 227:4
 Seder 13:17; Ketzos Hashulchan 66:12
 Admur 206:3; Kneses Hagedola 206; Olas Tamid 206:3; M”A 206:4; Elya Raba 206:5; Chesed Lealafim 206:3; Ben Ish Chaiy Balak 3; Kaf Hachaim 206:15; 582:9
Other Opinions: Some Poskim rule that it contains four words “Shalom Aleichem Rebbe Mori”. [Beis Yosef in name of Shivlei Haleket; Levush; Taz 206:3; P”M 487]
 1st opinion in Seder ibid; Luach ibid; Implication of Michaber 227:3; Ran Pesachim 4a based on Yerushalmi Brachos 9:2; Olas Tamid 227:2; Birchas Avraham 4:191; Elya Raba 227:6 in end that so is implication of Poskim; Nehar Shalom 227:4; Mamar Mordechai 227:5; Machatzis Hashekel 227:2; Chayeh Adam 63:9; M”B 227:12
 2nd opinion in Seder ibid; Luach ibid; Taz 227:2; Opinion of Elya Raba 227:6; See Admur 46:3 regarding Birchas Hashachar,
 So is the custom upon saying a blessing without Sheim Umalchus
 Admur in Seder and Luach ibid
The reason: As Safek Brachos Lihakel. [Admur Seder ibid]
 Admur ibid
 Halichos Shlomo; Halacha Berurah
 Seder 13:16; Luach 12:25; Michaber 227:2; Rosh Brachos 9:13; Rabbeinu Yona Brachos; Rif Brachos 43b; Yerushalmi Brachos 9:2; Ketzos Hashulchan 66:13; Piskeiy Teshuvos 227:7; Halacha Berurah [Yosef] 227
Other opinions: Some Poskim rule a new blessing may be recited even if the clouds did not disperse, so long as the thunder and lightning ceased for some time. [Implication of Eshkol, Rokeaich, Muchtam and Riaz, brought in Halacha Berurah ibid]
 The reason: Although the blessing over other sights is only said once every thirty days, that is referring to a case that one sees the same item, however here regarding thunder and lightning that the second thunder and lightning is considered a different item, a new blessing is to be said when the clouds have dispersed and caused Hesech Hadaas. [Bach 227; Olas Tamid 227:1; Kaf Hachaim 227:14; See Ketzos Hashulchan 66 footnote 23]
 Implication of Talmidei Rabbeinu Yona ibid “Shamayim Zachu Beinav” and Lechem Chamudos ibid that it is coming to exclude if the clouds scattered in different directions and remained covering the sky; Elya Raba 227; M”B 227:8; Kaf Hachaim 227:13; Piskeiy Teshuvos 227:7; See Halacha Berurah ibid that from some of the above sources it is implied that it is not necessary for the sky to be become completely cleared of skies.
 Piskeiy Teshuvos ibid
 Mishneh Halachos 10:46; Halacha Berurah [Yosef] 227:31
 Yerushalmi ibid “that day”, brought in Rif 43b, Rosh 9:13; Mamar Mordechai 227:3; Birchas Habayis 30:5; M”B 227:8 based on Yerushalmi; Kaf Hachaim 227:12; Birech Es Avraham 66:3; Halichos Shlomo 23:25; Tzitz Eliezer 18:78; Az Nidbaru 5:32; Piskeiy Teshuvos ibid; Halacha Berurah ibid
 However, the blessing is not to be repeated at night over the same set of storm clouds, even if it was said in the morning of that day, and he slept in the interim in the afternoon. [Birchas Habayis 30:5; Ketzos Hashulchan 66 footnote 23; Piskeiy Teshuvos ibid; Halacha Berurah ibid] However some Poskim rule the blessing may be repeated that night if the blessing was said in the morning. [Ashel Avraham Butchach 227]
If one woke up before daybreak: However, if he slept a set sleep at night and woke up before daybreak, then he may say a new blessing over thunder and lightning of the same storm, just as is the law regarding Birchas Hatorah. [Birchas Habayis 30:5; Piskeiy Teshuvos ibid; Halacha Berurah ibid; Ketzos Hashulchan 66 footnote 23 that so is possible understanding of Yerushalmi. However, he also suggests that perhaps according to the Yerushalmi it has nothing to do with sleeping, and rather each day a new blessing is required and hence it may not be repeated until daybreak even if one slept.]
 If one did not sleep the night: Some Poskim rule that if one did not sleep the night he may not repeat the blessing. [Implication of Birchas Habayis ibid; Ashel Avraham Butchach 227; Ketzos Hashulchan 66 footnote 23 that it is possible to understand the Yerushalmi that it is the sleep which makes the Hefsek and hence if one did not sleep the night a blessing may not be repeated; Az Nidbaru 5:32; Beir Sarim 5:45; Piskeiy Teshuvos ibid that if he did not sleep the night then since by Birchas Hatorah it is subject to debate, therefore Safek Brachos Lihakel and a new blessing is not to be recited. So also concludes Halacha Berurah ibid] However, see Ketzos Hashulchan 66 footnote 23 that it is also possible that according to the Yerushalmi, a new blessing must be said each new day, irrelevant if one slept, and it has nothing to do with Birchas Hatorah or Hesech Hadaas. So also concludes Chazon Ovadia Brachos p. 467
 The reason: Seemingly this follows the same ruling as Birchas Hatorah, that the nighttime sleep is considered Hesech Hadaas. [Birchas Habayis ibid; Ketzos Hashulchan 66 footnote 23; Tzitz Eliezer 18:78; Piskeiy Teshuvos 227:7]
 Implication of Setimas Haposkim of Admur ibid; Michaber ibid; Tur 227 who all record the ruling of the Yerushalmi but omit its ruling that the next day a blessing may be recited; brought in Ketzos Hashulchan 66 footnote 23; Gedulas Elisha 227:13