Dramatic irony occurs when we, as readers or an audience of a play, see a different meaning in words that the characters speak because we know what is going to happen to those characters.
So, in this case, the dramatic irony comes from the fact that we know that Macbeth is plotting to kill King Duncan. Duncan, not knowing he is going to die this night in this castle, is talking about what a pleasant castle it is. To him, he's just making small talk. To us, it is ironic because we know that he is going to die inside this pleasant castle.