First of all dialogue needs to sound natural. A juvenile delinquent would not use formal language any more than a politician would use street slang. Knowing who your characters are helps with how they speak. A word to the wise, if you are unfamiliar with the way a certain group of people speak, do not simply make it up. It will come across as insincere and phony. It is better to do a little research.
Another way to have better dialogue is to listen. Not so much as to what people are saying, but how they are saying it. The demented elves know that sometimes the best oneliner is the one spoken unintentionally, usually an off the cuff remark. It is highly recommended that should you hear that precious gem uttered, write it down. You never know when you will want to use it. Keeping a log of phrases will also help with getting a feel for natural language.
One last item to remember, as a story is an extension of the author himself, it is not a bad idea to put yourself in the shoes of the characters you create. Ask yourself, " what would I say in this situation?". It may make the process of writing dialogue easier. It will also flow more natural because the author is being himself.