In Shakespeare's Macbeth, the direct cause of Macduff's family being murdered is that Macbeth orders it to be done. After he gets his second dose of prophecies from the witches, Macbeth is informed that Macduff has fled to England. His immediate reaction is to order the killing of Macduff's family:
The castle of Macduff I will surprise,
Seize upon Fife, give to th'edge o'th'sword
His wife, his babes, and all unfortunate souls
That trace him in his line. (IV:1)
Macbeth has just been told during his visions to beware of Macduff, and once the witches are gone he declares that from now on he will not hesitate to act upon his thoughts, he will act decisively. When he's told Macduff has fled, the above speech is his reaction.
Why Macbeth orders this is, psychologically speaking, another issue, but I'll let another editor handle that aspect of your question.
After killing Duncan, Macbeth's primary objective becomes the removal of all hindrances to his way. And for securing his kingship, he aims to kill Macduff who is his chiefest enemy. The first apparition told that "beware Macduff" (4.1). But not killing Macduff alone is enough for him, he has to ensure the destruction of his entire family. Otherwise, he knows, the progeny of Macduff can be a danger for him. In Banquo's case also, we see that, Macbeth intends to murder Fleance along with his father.
Macbeth reaches the throne murdering King Duncan. He is such a man who can do anything to get the power and hold on it. He is extremely ambitious. Besides, the witches' prophecy and his wife's instigation stimulate his evil nature. It is his gluttony along with his ambition which leads him to the assassination of each member of Macduff's family.