This question can be answered through a close reading of the text; Dahl doesn't directly state the reason, but it can be inferred from clues given. If you look carefully at the story, it indicates that Mary was waiting contentedly for her husband to come home from work. He does, and she waits on him hand and foot, wanting to please him and make him happy. However, he seems a bit distracted this evening, and drinks his entire cup of whiskey all at once, and is nervous. Finally, he tells her that he is leaving her. Roald Dahl writes,
"And he told her...he added... 'Of course I’ll give you money and see you’re looked after. But there needn’t really be any fuss. I hope not anyway. It wouldn’t be very good for my job.'"
These lines hint at the fact that he has just relayed the horrific news that he didn't love her anymore and didn't want to be with her. Dahl doesn't relate the exact words that he says, but we can infer it from the fact that he says he will give her money, that he doesn't want any fuss, that it is bad news, etc. And, Mary's shock at the news also implies that her husband, who she was very happy with, appears to be abandoning her and their unborn child.
This is reason enough for her to lose it. In a daze, she goes down to get meat for dinner, and before she even realizes what she has done, she bashes her husband over the head with the frozen leg of lamb. The reason is her shock and dismay at a man who she loved so dearly betraying her and leaving her and her baby to fend for themselves in the world.
I hope that those thoughts clear things up a bit; good luck!