I love writing dialogue. It's not a surprise that my first commission was for a murder mystery play. I've always found dialogue easy to write and my experience as an actor and a director has certainly helped.
Here are a few things I try to keep in mind when writing dialogue:
Start the conversation in the middle. In real life, usually the first few exchanges in any conversation are hellos and how are yous. No one needs to read that.
There's a talker and a listener. This can switch back and forth, of course, but only one person at a time can drive the conversation.
Every character has their own rhythm. When I go back through my manuscript, I always check that each character's voice is consistent. If I can't tell after the first sentence who's saying it then I know I've lost their voice.
Never have a lengthy dialogue with more than three people. In movies or television you can have a conversation between much bigger numbers. In a book it gets too muddled.
Don't forget the pauses. Every conversation will pause, for a myriad of reasons. Sometimes silence is far more powerful than words.
Every conversation has to have a reason to be there. If it doesn't move the plot along or enrich the reader's understanding of the characters, lose it.