Thunderstorms don't bother Elka in the slightest. After she's done watching out the window (she'd really like to watch from the porch, which we do, sometimes), she typically snoozes through them. The thunder doesn't make her jump, or pace, or bark, the lightning causes no anxiety. She typically won't go potty in the rain is really the main hangup (well, that, and I don't take the dog out when there's lightning. Just common sense.)
Not all dogs (and owners) are as lucky as I am, that they can be so casual about storms.
Some dogs are made extremely anxious by thunderstorms. It can range from restlessness (and remember, animals are more sensitive to environmental cues than we humans, and can tell a storm is coming long before it arrives), to nervousness, to outright terror. Some dogs are able to just ride it out by finding a place they feel safe in which to hide, such as a closet or under the bed. My aunt had a dog when I was little, and when there were fireworks, he would hide in the bathroom, by the bathtub (I think). Fireworks can be a similar stressor to thunder, and so the example generalizes.
As I've said, Elka is not a storm-stressed dog. If we go outside for potty in the rain, sans thunder and lightning, she will stand as close to me as possible, with her ears down, occasionally looking at me as though to ask "why do you abuse me in such a way?" So, I don't have any first hand advice regarding this problem, but I do know that it is a major problem for some people, and I'm excellent at making referrals!
First off, I have read excellent testimony with regards to the Thunder Shirt (http://www.thundershirt.com/). For storms specifically, as the name might suggest, and anxiety in general. the Thunder Shirt gives all-over pressure to your dog, which seems to help ground them and mellow them out. Though it sounds kind of wacky, I've read two of Temple Grandin's books, in which she described building a "hug machine" for calming purposes. My understanding is there have also been cow-sized ones built, as Temple Grandin works a good deal with the farming industry, and improving conditions for animals in corporate farming situations (though I can't find a link to give an example of the cow one).
Second, a behavioral source one can always consult is Patricia McConnell. Articles she writes and topics that she discusses on her blog and in her books come from her experience as a dog owner, trainer, and behaviorist. In an article on The Bark magazine, entitled Reducing Fear in Your Dog, McConnell opens up describing comforting her Border Collie, Lassie, during a thunderstorm. A lot of people believe that comforting a dog when they are fearful will only confirm and reinforce the fear; as McConnell explains, comforting and giving treats in these kind of situations does not reinforce the fear, but rather is what is referred to as "counterconditioning". If a fearful stimulus can cause good things to happen, then it must not be so fearful after all, n'est-ce pas? McConnell also discusses many other thunder storm strategies here on her web site, and rather than try to quote them all, which seems rather fraudulent anyway, you can read further here: Thunderstorm Phobia in Dogs
Counterconditioning can be a powerful thing. When Elka was a puppy, she would make a big mess while eating her kibble (she still sometimes does, but also cleans it up right away), so we made the decision to put her bowls on a cookie sheet. This monumental event occurred when Elka was out of the room. When she returned to the kitchen, she was startled to see that her food and water bowls were suddenly in a Very Scary Place. She would not approach them, and really didn't want to be in the kitchen either.
Hmm, thought I. I removed the bowls from the cookie sheet and placed them in front, leaving the cookie sheet where it was. I went to the refrigerator and got out some cold cuts; ham, if I remember correctly. I called Elka, who stood mistrustfully in the kitchen doorway. I stood next to the cookie sheet and threw her a piece off of a ham slice. I put some ham in her bowls. I put some ham on the cookie sheet. I fed her some ham by hand again. I praised her to high heaven and told her what a good, smart girl she was. About twenty minutes later, the bowls were on the cookie sheet, and all was right with the world again.