On the night of the intended murder, Macbeth thinks about all the reasons he has not to kill Duncan. In part, he says,
Besides, this Duncan
Hath borne his faculties so meek, hath been
So clear in his great office, that his virtues
Will plead like angels, trumpet-tongued, against
The deep damnation of his taking-off. (1.7.16-20)
In other words, Macbeth calls Duncan a very humble and uncorrupt leader, and he feels that Duncan's virtues will continue to live on after he's dead and gone, like trumpeting angels that play to protest Duncan's unjust murder. This is one way in which we know Duncan to be a good king: he is humble and virtuous, unselfish and free from corruption.
Further, Duncan doesn't hoard all of Scotland's riches. When he is pleased with Macbeth's services to the crown, he gives Macbeth a new title (the title that formerly belonged to a traitor) rather than keeping that noble's wealth and lands for his own (as was his right). Macbeth, on the other hand, does not do this once he becomes king. Malcolm, at the end of the play, sharply contrasts with Macbeth as well because he behaves very much like his father, Duncan; in his first speech as king, he says,
We shall not spend a large expense of time
Before we reckon with your several loves
And make us even with you. My thanes and
Henceforth be earls, the first that ever Scotland
In such an honor named. (5.8.72-77)
It seems likely that Malcolm learned his kingly qualities from his father, as he was present when his father bestowed honors on his thanes for their loyalty. Now, Malcolm does the same thing. He claims that it will not take long for him to show his gratitude to those who remained loyal to him (as his father used to do), and he immediately elevates them by promoting them to new titles.
Many productions, such as the one staring Judy Densch as Lady Macbeth, depict Duncan as very old and venerable, carried on stage in Act 1, in part to make it a more egregious crime when the Macbeths kill him. We do see his kindness in 2.2 when he visits the Macbeth castle in Inverness, for Banquo tells Macbeth that “the king’s abed” (suggesting, perhaps, he is worn out from his journey) and that he has given Lady Macbeth “this diamond…by the name of most kind hostess” (13-15). Lady Macbeth says, to explain why she didn’t kill him, “Had he not resembled / My father as he slept, I had done’t” again giving reason to consider him a kind, generous old man (12-13).
Duncan is not seen much in the play, due to his being murdered early in the action. However, we do get a chance to see a strong-willed leader, able to put down a rebellion and to punish a traitorous thane, as well as a king concerned with his men and willing to share the fruits of the victory. As you'll see in the link below, his one character flaw appears to be his lack of good judgment concerning the true character of Macbeth.