In the second of Peter Jackson's "Lord Of The Rings" movies, "The Two Towers", there is a line in which Legolas, the Elf, says, "The White Wizard approaches."
It's a simple, scene-setting line, and in context, it flows with the rest of the film. In spite of its archaic formality, it's not out of place.
Yet, in almost any other cinematic setting we'd care to name, the line would be almost laughably out of place. It could kill a scene or, since dialogue is the only substantial connection between the writer and the viewer, it could cripple the whole film.
Dialogue has two primary functions. Its primary use is to illuminate the relationship between characters. It also can describe off-scene action.
Pretty short list, eh? it's short for a reason - dialogue is not action. It sets the stage, cocks the pistol...whatever metaphor you want to use can fit, but the basic tenet is that dialogue builds a scaffold off which action can leap.
And think of it as a treat for the reader, a privilege to eavesdrop. Solid narration followed by two paragraphs of snappy dialogue is something to which a reader can look forward; three straight pages of dialogue can be Chinese Water Torture.
With that understood, how do you make it believable? The first rule is that whatever your characters say has to be congruent with who they are. Legolas is a character in a story which takes place in a land not unlike medieval England, so we'd expect the archaic and formalized sentence structure. It also fits his personality; he moves with an almost regal dignity, and has none of the hail-fellow-well-met about him
If that line came from Gimli, the dwarf, it wouldn't work. He'd have said, "The White Wizard's coming" in a thick Scots burr.
Second, most of the things real people say is not, taken as individual statements, expository. We don't give an introduction, develop our thought, and wind up with a conclusion, all in one go. (Unless we're college professors, but who want to read about them? I was one, and that is how I sometimes talk, according to my wife.)
But you shouldn't overlook that to fit the job dialogue has to perform, it does have to be expository; it has to have a point. otherwise it's just filler. let your characters make a definite, plot-advancing point.
Third, where possible, the emotion can often come from the words themselves, and not from adverbial phrases:
"I just won the lottery," he said happily.
Would any same person be unhappy about winning the lottery? We can get rid of the 'he said happily' by simply using appropriate punctuation:
"I just won the lottery!"
Doesn't that look punchier on the page? You do have to beware of over-use of exclamation points, though! Few things are more irritating than their misuse! See?!
It's a matter of balance.
Finally, make dialogue a tennis match, and give all participants an equal part of the load as you can. Don't let your protagonist (or villain) do all the talking, with the others present just to add "Amen"s.
If you pay attention to these areas, you'll be a long way down the road to dialogue that's snappy and fun to read.
How do you handle dialogue? Readers, what do you like to see?