Dialogue is a crucial part of every single book. There has to be a happy medium when using dialogue. It can either add to a book or completely take away from it. I know I hate reading a book where the dialogue is fake or seems stupid. It takes away from the whole book. In most books, the dialogue is the best part. This is where you hear a characters voice and get to know them better.
I think the most important thing when writing dialogue is making it believable. The best way to do this is to listen to how you talk and how others converse. People don't use perfect grammar or complete sentences. Most people don't have a filter either. They use slang or swear. You have to reflect this in your book. To make it believable it has to be real. Also you have to remember how each person talks. Their speech patterns will generally stay the same throughout the book. Someone doesn't start innocent and end up dropped f bombs too. Their speech and personality have to match.
Like I said before there has to be a balance in your writing. You don't want the whole story to be dialogue and you don't want it all to be description and back story. There has to be a happy medium. This means only use dialogue that adds to the story. Take out lines that are just there. Someone saying something that doesn't add or more the story along should not be there. Make the dialogue meaningful.
Something that really bothers me in my own writing and in others is using proper grammar and wording. I hate it when someone puts a period, then the quote but has the next word lower case. I see this all of the time. Use proper grammar! Use commas sparingly. Also don't use he said, she said too much. Mix it up or leave it blank. As long as we can tell who is talking and when, you don't have to write he said after every single one. It becomes repetitive and takes away from the writing.
Another thing that helps and this is just a personal preference but I like it when dialogue is split up. For example, instead of having someone say, "I hate you so much dad!" He yelled. I would rather read, "I hate you so much dad!" He yells as he slams his bedroom door shut. Adding an action to dialogue makes it more believable and makes it better to read. Actions also show more about what is going on in a scene. Instead of reading, you can actually picture a kid yelling at his dad and slamming the door.
Overall, use dialogue as a boost. You don't want it to take away from your story. You want it to add to it. Use it to help create character personalities and set a scene. Use it to give information to the plot line. Dialogue can be extremely helpful in a story by moving it along. Dialogue is good! Don't be afraid to use it.