Fear of things such as loud noises is normal in all animals, but an exaggerated fear response is called a phobia.
It is fairly normal for a dog to develop a phobia of noise, thunderstorms, or other events. Animal behavior experts tell us that dogs may be phobic about thunderstorms due to the noise or to something else about the storm, such as lightning, wind, or changes in barometric pressure.
Some dogs develop phobias so severe that they injure themselves trying to escape from noise or storms. An animal behaviorist can help you to develop a program of desensitization (decreasing the fear of noise by gradual exposure to it) and counter conditioning.
Sedatives or anti anxiety drugs may help while you are working to change your dog’s behavior, but they cannot solve the problem alone. Talk to your veterinarian or ask for a referral to a veterinary behaviorist or a certified animal behaviorist in your area for help in developing a plan.