What reason does the monster give for killing William and framing Justine in Mary Shelley's Frankenstein?
When the creature sits with Frankenstein and tells his story, he relates his trip to Geneva, coming by chance across young William. The creature believes that a child not having learned to be fearful of the world, might be a good companion for him. He tells William he will take the boy who will not see his family again, but the boy shares his identity as a Frankenstein, threatening the creature with his father's protection. Once the creature realizes this boy is related to Victor he says:
Frankenstein! you belong to my enemy—to him towards whom I have sworn eternal revenge; you shall be my first victim.
In order to punish Victor, the creature kills his young brother. In doing so, he discovers and takes the miniature portrait of his mother (Caroline) that the boy carries, away with him. Soon he comes upon Justine, asleep in the barn. She is not as beautiful as the woman in the portrait, but even as he thinks this, he knows that should she awake, she would reject him in horror as others had done.
Thus she would assuredly [denounce me if she] beheld me. The thought was madness; it stirred the fiend within me—not I, but she, shall suffer; the murder I have committed because I am forever robbed of all that she could give me, she shall atone. The crime had its source in her: be hers the punishment!
Knowing something of the law from listening to Felix, the monster plants the portrait in the folds of Justine's dress so she will be accused of the murder of William.
In essence, the creature kills William because he is related to Victor, and he frames Justine with the sense of power he realizes he has to bring havoc to the world around him: especially to her because she represents all he cannot have.
The creature kills William and Justine to get revenge against Victor for creating him and then wholly rejecting him. He has been hurt by lack of love and acceptance, and he wants to strike back in return, out of his pain and anguish. As the creature says to Victor:
Why did you form a monster so hideous that even you turned from me in disgust? God, in pity, made man beautiful and alluring, after his own image; but my form is a filthy type of yours, more horrid even from the very resemblance. Satan had his companions, fellow-devils, to admire and encourage him; but I am solitary and abhorred.
His murder of William is directly in retaliation for Victor's hatred of him. With Justine, it is slightly more complicated. The creature reacts against Justine not only because Victor, his creator and "parent" rejected him, but because others to whom the creature has reached out, even seemingly good and kind people, have also reacted in horror to him. Therefore, when the creature comes across Justine, he wants to kill her not only because of her relationship with Victor, but because he knows she would abhor him were she to awaken.
The Monster's brutal murder of William and his subsequent framing of Justine is a sign that he's becoming more human yet no less monstrous. As the Monster starts to learn more about the world, he realizes just what merry havoc he can cause, especially to those who cross him. As the Monster isn't human, he is beyond the bounds of society, with all its norms, laws, and values. Under the circumstances, then, it makes perfect sense for him to commit an act of murder and have someone else take the fall for it.
The Monster is motivated primarily by revenge. He's grown to hate Frankenstein for disowning him and for not giving him the companion he so desperately craves. But as Frankenstein is the only man alive who can do this for him, the Monster spares his life, choosing instead to get at his creator through his nearest and dearest. In killing William and framing Justine for the crime, the Monster hopes to intimidate Frankenstein into doing what he wants.