In this story, the weather helps to set a mood of foreboding from the very beginning. Right at the beginning of the story, we know that something bad is going on. The night is described as wind-scourged and all the animals are afraid. This helps to set up a mood that is somewhat scary; a mood that makes us think bad things will happen.
As we go along, the weather gets worse. Eventually, of course, it blows the tree down on the two men. The weather continues to be bad, which continues to set a scary mood for the story. With the weather the way it is, we can see that the men are having to fight against nature.
So, the short answer is that the bad weather helps to contribute to the scary mood of the story -- the mood that tells us that the men are struggling against nature and that bad things will happen to them.