Here's what I've learned that has helped me out:
A. Dialogue, like details, should be significant.
B. Dialogue can show action, emotion, advance the plot, provide exposition, set the scene, characterize, set the mood, reveal the theme, foreshadow or remind.
C. Include only the dialogue that, no matter what else it does, advances the story in some way.
D. "The trick to writing good dialogue is hearing voice. The question is, what would he or she say? The answer is entirely in language. The choice of language reveals content, character, and conflict, as well as type."
E. Dialogue is characters saying "no" to oneanother.
F. Elliptic speech is often a part of dialogue (fragments).
G. Characters will sometimes finish each other's sentences.
H. Use speech mannerisms: fragments, slang, interruptions, changes of direction, and indirect replies.
I. Use contractions.
J. Capture the rhythm of real speech without real speech's hums and haws.
K. Give each character distinct speech mannerisms. A character should be identifiable by how he or she speaks.
L. Eliminate needless "hello/goodbye" exchanges or meaningless chit-chat.
M. Don't make characters say things to each other that they already know for the benefit of the audience.
N. Avoid tags that are unneeded. Include a speech tag only if the speaker is unclear.
O. Avoid unspeakable tags.
P. Watch out for uninterrupted dialogue that fails to reveal emotions or reactions.
Q. Pace dialogue by interrupting with action, thoughts or description.
R. Try your dialogue out loud.
An article that set me on the road to writing better dialogues was Gregory McDonald's "On Dialogue" in the Mystery Writer's Handbook. As I understand it, he was asked to contribute a chapter on dialogue since he is renowned for writing it, but he struggled trying to put together an essay. Finally he chucked his unsatisfying article and rewrote the chapter as a dialogue. I thought that article alone was worth the price of the book.
One of the key lessons for me was that when characters speak, they are both talking about whatever the subject is and existing in the real world, so you might get a conversation like this between two people driving somewhere:
"Here? That's Aspen Street. Less traffic on Lincoln Avenue. I don't see any evidence for God. They did a study about prayer in hospitals that showed people who prayed didn't get better faster or die at a different rate than people who didn't pray."
"They're doing shoulder work on Lincoln. It's one lane from here to the mall. Did you read that C.S. Lewis book I gave you, The Problem Of Pain? He talks about suffering and God in a pretty convincing way. You missed the turn."
"You said Lincoln wasn't any good. We can take the detour. You know, Tolkien didn't like Lewis in the end. He thought Lewis was a Johnny-come-lately to religion, and then made a bunch of money on it."
"That doesn't mean God doesn't exist."
"Great, a traffic jam. Do you think if there was a God that traffic would always be this bad? A just God would give me more green lights."
"Maybe God wants us to talk more so he slowed us down."
"I don't like the idea of a God who would manipulate everyone's schedule so you can try to convince me that he is real. It sounds like micromanagement. How about we park the car and get some coffee?"
"I know where there's a Starbucks. Turn right here."
Just a reminder, I have put the links to all of my writing-related blogs here. I built the links page because LJ doesn't have a decent search function within the blog, so even using tags I couldn't easily find entries that I remembered writing.