Familiarization. By one of those "nature sounds" CDs of thunder storms. Play it at a very low volume, so you can barely hear it. Each day play it some more, but each day ease the volume up just the least bit.
First, practice in your mind how you will act when you are not afraid of thunderstorms. Imagine the worst storm ever and see yourself going about your business as if nothing out of the ordinary is happening. Repeat this exercise morning and night. Then, the next time a thunderstorm occurs, play it just like you practiced. If necessary, put a rubber band on your wrist and snap it sharply each time your mind tries to wander back to your scared behaviors.
The way I explained it to my granddaughter was when you see a lightning bolt in the sky . God bowled a spare. It if it was thunder he got a strike. And then the biggest noise out of it all that's when God bowled a gutter. Hope that helps.