Goodness me, how presumptuous is this title — who am I to preach about writing dialog properly? Let me tell you something for sure; if you don’t write your dialog properly your manuscript will be returned. If you’re very lucky it will only be for re-editing, as opposed to being rejected out of hand.
The fact is there are at least two aspects to writing dialog. First is the purely mechanical part — in other words how should you punctuate the dialog according to the rules of grammar?
A more challenging problem, and one which I confess I don’t feel I’ve fully mastered is to make your dialog interesting and compelling for the reader (you, as the author, presumably found it interesting or you wouldn’t have written it — but is it as interesting for the poor sap who has to read it?). Here are a couple of links for you to take a look at, but another thing you can do is to research authors who are well known for writing good dialog, and check out how they do it.
Novel Writing Help (this covers some punctuation too)
By the way, more than one of you maybe thinking “Hmmm…this guy needs to take some of his own advice!” And I would agree with you. My books were written over a long period of time, and as the old adage goes; you never stop learning!