This scene serves two main purposes:
- to reinforce the basic good-heartedness of Duncan's nature, showing that there is no reason that he should not continue to rule as a wise and just King,
- and to begin to build the suspense that leads up to the murder of Duncan. To create this suspense, Shakespeare uses dramatic irony.
Duncan, immediately upon entering, says, "This castle hath a pleasant seat." A double whammy of dramatic irony (In scene v, the audience has just heard Lady Macbeth say that Duncan "never shall" see the "morrow.") and support of the open-hearted way that Duncan is prepared to embrace Macbeth and his wife.
Banquo also adds to the irony when he says, "Heaven's breath/Smells wooingly here." The irony here, of course, is that Heaven must be far from this place, as Lady Macbeth has just called upon "thick night" to "pall [her] in the dunnest smoke of Hell."
The balance of the scene is an interaction between Duncan and Lady Macbeth, which adds to the dramatic irony and suspense, but also reveals how very cunning and cool Lady Macbeth can be. She doesn't bat an eye as she lies in the very face of the man heaping compliments upon her, knowing that she will be witness to his death before the next sun rises.
For more on this scene, please follow the links below.