The criteria necessary to recite a blessing over thunder:
Upon hearing thunder, one is required to say a blessing. The custom is to recite the blessing of “Baruch Ata Hashem Elokeinu Melech Haolam Shekocho Ugvuraso Malei Olam.” Unlike the common misconception, the blessing over hearing thunder must be recited even if one did not see the lightning.
Within how much time of the thunder and lightning must the blessing be recited? The blessing over hearing thunder or seeing lightning must be said within Kdei Dibbur of seeing the thunder and hearing 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 on]. Practically, one is to say the blessing without saying Hashem’s name [i.e. Baruch Shekocho Ugivuraso 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 Ugivuraso Malei Olam
 Seder 13:15; Luach 12:24; Michaber 227:1; Mishneh Brachos 54a
 Admur ibid; Luach ibid; Taz 227:1
 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 13:17
 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