I’m sure the issue of writing dialogue has been covered before, but since I’ve noticed a lot of weaknesses in this area in the submitted material I’ve been reading, I thought I would add my two cents.
The way I see it, there are two major components to writing dialogue well. The first of these is realism. Spoken language is very different from written. Creating convincing, interesting dialogue isn’t easy, though, because you really have to strike a balance between mimicking natural speech patterns and not boring your reader with the umms, likes, and extraneous “filler” chit chat which doesn’t help develop your characters or plot. It’s the difference between the witty banter on a TV show like Gossip Girl and the frequently tedious conversations which take place on “unscripted” shows like The Hills (no personal bias there, obviously).
The second component to writing good dialogue is context. I vividly remember a creative writing exercise from when I was in middle school. In this exercise, you are given four or five lines of pure dialogue—no he saids or she exclaimeds or anything outside the quotation marks. The challenge was to take those lines and create five distinct scenes around them. The scenes had to vary in setting, situation, atmosphere, and outcome.
The point of the exercise was to prove that the average conversation contains far more subtext than it does text. Words aren’t merely said; there is tone, body language. What are the characters doing while they talk? Not only can context enhance the realism of the scene (in real life, I find that really momentous conversations often take place while one is, for example, chopping celery), but it can subtly advance the plot—such as a seemingly innocent fidget which signifies that the fidgeter is not telling the truth.
Hope that helps!