1) According to the basic law, one who sees lightning or hears thunder says the blessing “Oseh Ma’aseh Bereishis”. If he wants, he may say “Shecocho ugevuraso malei olom”. (Shulchan Aruch and Mishne Berurah 227)
2) However, the accepted custom is to say“Oseh Ma’aseh Bereishis” on the lightning and “Shecocho ugevuraso malei olom” on the thunder. (ibid)