Usually dogs bark, to get your attention, they want your opinion on something. I've found it best to go see what they find so interesting, talk to them in a normal, calm voice. You don't want to encourage then, by being to positive or appreciative (since you probably aren't), but you don't want to scold, yell, or punish them either. They are trying to do something useful for you, like fertilizing the neighbor's yard (they don't seem to appreciate that, anymore than the barking, don't figure...). But if you just yell at them, they tend to believe you are just joining in on the fun, the learn from example. You get loud and aggressive (beat them), the learn to be loud, and aggressive (bite), what ever starts the barking, will continue to trigger the unwanted behavior. If you go and look, and show it's not important, they stop bothering you. They don't want to upset you, just help you.
A noisy neighbor dog, is the owners responsibility, and trying to talk to them is usually the best route, they probably don't care for the barking and complaints either. Most people don't know how to train their pets. Unfortunately, the nuisance barkers, are usually owned by negligent masters, who lock the dog outside at night, or keep them on a chain, and it's the only way they know the dog is still alive. Best to call the police or animal control. The dog would be better of in a new home.