Duncan is a good king in that he rewarded loyalty. Macbeth was a good king because he was decisive. However, each king also had bad qualities.
Duncan was a good king because he gave Macbeth a promotion to recognize his bravery and loyalty on the battlefield. He even feels bad when he does not honor him sooner.
O worthiest cousin!
The sin of my ingratitude even now
Was heavy on me. (Act 1, Scene 4, p. 17)
However, Duncan should have been more aware of what was going on. Macbeth later had spies to make sure everyone was loyal to him. Duncan could have used spies, or at least better guards. He was totally taken by surprise. He thought Macbeth would be thrilled at his promotion, and he did not see the betrayal coming.
Macbeth is described as a bloody tyrant, so he was far from an exemplary king. He did do some things well, however. He had a banquet for his supporters. He acted decisively when threatened.
To be thus is nothing,
But to be safely thus. Our fears in Banquo
Stick deep, and in his royalty of nature
Reigns that which would be fear'd. ’ (Act 3, Scene 1, p. 42)
Of course, Macbeth takes it a little too far and is soon sending murderers to kill anyone he suspects is not faithful. You can’t run a kingdom that way. Macbeth gets the reputation of being a bloody tyrant, and Malcolm and Macduff come to unseat him.