From theatre scripts to film scripts to novels and short stories, dialogue plays an important role in developing both story and character. Just as some people have an easy time creating characters or structuring plot, others have a natural "ear" for dialogue.
On the other hand, just as character creation and plot design are tough for some writers, some writers will probably always have to extend that bit of extra effort to write dialogue that "sounds right." That isn't to say that a person can't get a better handle on writing dialogue. There are definitely some things any writer can do to write dialogue fairly well.
- Consider your character. Many things affect the way people speak: where they're from, level of education, self-confidence level, ethnic or national background, command of the language. The list is pretty long. As you create dialogue for your characters, consider what you know about them and then consider how these factors will affect how they speak to each other. "Voice" is a very important concept in writing dialogue. Basically, each character should have his own "voice" - that is, he shouldn't sound exactly like the next guy (unless you're writing stylized dialogue where that kind of mimicry is the intent). And the way you keep voices unique is to make sure that characters speak according to the many different aspects of their backgrounds.
- Keep your ears open. So how do you get a character to speak "according to his background?" Well, again, unless you're using a stylized form of dialogue where people aren't meant to sound like they do in real life, you can figure out how your characters speak by listening to their real life counterparts. Listening, like observing, is a key skill for writers to have. Perhaps nowhere is it more important to put that skill to use than when writing dialogue. You will notice many things about how people talk. Their jobs, cultural background, educational background - all of these things can be reflected in their speech. Even audience will affect how people talk - a man will talk to his friend one way and his daughter another. Listen to people who resemble your characters and see how they say things and, just as importantly, what they say. A proper church lady, for example, might never use bad language.
Also listen for traits that can be almost universally applied. For example, people in everyday conversation usually speak in relatively short bursts, not big paragraphs or huge sentences. They speak in sentence fragments using contractions (Note: One sure way to write stilted dialogue is to not use contractions). People stammer with "uhs" or "ums" and pauses. They use slang and catch phrases. Listen well and try to recreate what you hear, taking into consideration your own characters' specific traits. Easier said than done, I know!
- Make sure the dialogue has purpose. One way to make sure your dialogue is good is to make sure your dialogue has a purpose. Unnecessary dialogue is, by definition, bad. In general, every element of any story should have a purpose. Dialogue is no exception. If you find yourself writing dialogue that doesn't a) reveal character b) move the story forward c) address the theme or d) have some kind of artistic effect like being poetic or reflecting the cadence of the story, or whatever it might be, then leave that dialogue out. Self-censoring is an important skill for any dialogue writer to have.
- Use the rule of index finger. I don't really know where I heard this but someone once suggested that a block of dialogue should never be longer than the average index finger. I think this is a pretty good guide. If you're writing a book or a script and you have one person speaking - without interruption - for a section that is longer than your index finger, find a way to break it up. This may mean throwing in another character's line, or a scene direction or a descriptive sentence. Whatever it is, try to do it in a natural way that adds to the scene; artificial breaks can be detrimental to the quality of a passage. I know, again, easier said than done.
Of course, this isn't to say that long speeches should be written out of your work. Many of the greatest works in theatre rely on long monologues and soliloquies. TV dramas frequently have big moments where lawyers give closing arguments that go on for a good chunk of time. But these are things to be used sparingly. Good dialogue usually moves briskly. And when multiple characters appear on the page or onscreen, they generally shouldn't be left standing around while one other character goes on and on. Think of how you feel when someone dominates a conversation in real life. You're just waiting for them to zip it. Don't have us waiting for your character to zip it!
- If you choose a stylized form, go for it and stick with it. A lot of writers from Shakespeare to Hemingway to Mamet have characters who intentionally do not speak the way a normal person would speak. Why do they do this? Each author has his own reasons: to make things more beautiful, more poetic, more succinct, to make the words emphasize what's happening in the story. Who knows what it may be. If you want to write stylized dialogue or have people speak in couplets, repetitive phrases or even nonsense words, go for it. But be careful, because if it's not done well, it can hurt your story's overall impact as surely as lame "regular" dialogue. My advice is, really go for it, don't do it "halfway." And be consistent throughout the story: If you start with a man speaking in rhyme, and then he suddenly stops without explanation, the audience may be confused. And let a second set of eyes (or ears) give the piece a once-over and offer an opinion on how the dialogue "works." (See below for more on that...)
- Avoid writing phonetically. Everything I've ever read and heard about writing dialogue - especially in scripts where it's going to be acted by a second party - is, unless you're Zora Neale Hurston, imply accents and local speech patterns and do not write things phonetically. For instance, if you have a character who speaks with a thick drawl, simply indicate he speaks with a thick drawl parenthetically under this character name (in scripts) or somewhere in the passage (in stories and novels). Don't write: "I sho' doo lahk yo." Write "I sure do like you," he said in a thick Southern drawl. We must be able to understand what you're talking about! Of course, this doesn't mean you can't ever leave the "g" of an "ing" like in "I was talkin' to him the other day." That's fine. Just don't go overboard trying to write the way a person sounds. You will likely just confuse your audience.
- Hear it out loud. Whether you have an acting troupe at your disposal, a writer's workshop you rely on or whether you just stand in your room and read your own work, hear that dialogue out loud. Whether you're trying to sound natural or pull off some type of style, hearing the dialogue will be a good indicator of how well your dialogue "works." While this may be especially true for writers of scripts, any writer who wants to know how her dialogue sounds should definitely hear it out loud.
Writing dialogue is tough. Listening to the world around you and thinking about what your characters are going to say before they say it may make it easier. Also, don't forget, sometimes silence can be golden and the best thing to do is to forgo dialogue and let some action or description say what needs to be said.