Macbeth opens with "Thunder and lightning," portents of the evil to come. The witches enter with thunder in Act I, scenes i and iii, and again in Act IV.i. Off stage, the thunder would have been easily created by shaking sheet metal.
The foul weather of "thunder, lightning, and rain" serves as a pathetic fallacy (attributing human feelings to inanimate objects, like weather), foreshadowing the inner storm brewing in Lady Macbeth and Macbeth. In short, the witches are like meteorologists: they forecast the outside weather (thunder) and the internal weather (murderous thoughts of the Macbeths).
Also in Act I is the Bleeding Captain's battle recap for Duncan, which features weather imagery:
The foul weather is again echoed in the murder scene of Banquo. Just before he is besieged by the three murderers, he says to his son Fleance:
Thunder is sounded when the witches show Macbeth the future:
Thunder. First Apparition: an armed Head.
Thunder. Second Apparition: A bloody Child
Thunder. Third Apparition: a Child crowned, with a tree in his hand
All told, the weather imagery and stage sound effects couple to create an internal and external sense of awe, mystery, and foreboding in the minds and ears of the reader and audience. Just ask Duncan and Banquo: when it rains, it pours blood in Macbeth.