Make sure your dog is properly exercised and entertained. Even dogs with large backyards need to be walked or run for at least 60 minutes everyday. Make sure to provide your pup with interactive toys like food cubes and bones to chew. If your dog is tired and has toys to engage with, then your pup will be less likely to bark at a neighbor.
Actively listen for those moments when your dog is not barking; go outside and lavishly praise your pup. Spend time in the yard when your dog will most likely hear the neighbors or other noises that make them bark. As soon as your dog hears the noise, but BEFORE they start barking, praise and treat them for being quiet. Your dog will soon learn that silence is golden and will start to bark less.
Go in the backyard with your pup. When your dog hears a sound and starts barking, let them bark a few times and then say quiet in a firm but soft tone. If your pup stops barking, even for a second, praise and give them a treat as you say, good quiet. If the noises that make your dog bark occur inconsistently then start practicing the quiet command with a sound you can control such as knock at the front door or a doorbell. Once your dog understands quiet in the house then you can use the word to stop your pup from barking in the backyard.