With dialogue, it is important to set up the subtext. If you have established that two people hate each other, and then you have them in a room talking about even the weather, the audience will see the mutual dislike in their dialogue. Without the subtext, they may just think it is a conversation about the weather.
Dialogue is also used to reveal important details about the characters or their situation. This is called exposition. It is not easy to do - you still want the conversation to appear natural.
Sounding Natural
Try to make the dialogue sound natural. If you have something witty to say, make sure it fits the character. He/she is speaking, not you.
Address and Dismiss
If your scenario seems to be going “over the top”, it helps to have a character exclaim what the reader may be thinking (“This is ridiculous!”), and then promptly move on.
The author is addressing the potential ridiculousness, and then quickly dismissing it to continue the story.
May be tricky to do.
Address and Explain
Sometimes a character may exclaim something which points out something the audience may have misconceptions for. Like in Star Wars when we’re shown the Millennium Falcon. The audience may think it’s a great ship, until Hans Solo says “What a piece of junk!”