Macbeth, having given himself over to the desire to become king, finds it within himself to do terrible things, including killing his once beloved king so that he might take the throne. Once he finds himself wearing the crown, his desire to keep it leads him to consider finding ways to avoid the prophecy of the witches that Banquo's heirs should take the throne. So he resolves to kill Banquo and his son Fleance in order to maintain his hold on the throne.
Whether it is right or not perhaps depends on the perspective. From Macbeth's point of view, if he wants to avoid the prophecy's fulfillment, killing Banquo and his heirs seems to be the expedient way to do it. On the other hand, from a moral perspective, it certainly seems repugnant to want to kill a child in order to maintain one's hold on a throne that was taken only by murder in the first place.