Nothing's more obnoxious than your dog barking to be let in and out—unless it's someone else's dog barking. It happens all the time. A neighbor puts the dog out and then forgets about it, letting it cry and howl without cease, and without doing anything to stop it. It's one thing when the dog barks at the occasional passerby, but sometimes, action is required. If you want to get your neighbor's dog to stop barking, you've come to the right place.
Instructions
Approach your neighbor. Talking to your neighbor about his pet is the most important step, but for many it's also the most difficult. Don't be confrontational, but explain gently and firmly that the dog's barking is annoying and needs to stop. Explain why it's a problem and when it's a problem: at night when you're sleeping, during the day when the kids are taking a nap, etc. You can send a letter from the neighborhood if you want to remain anonymous, but it's typically more effective if the neighbor can put a friendly face to the request.
Keep track of the barking. If the dog barks constantly even after you've approached the neighbor, begin tracking when the dog barks: the times of day and how long. Send a letter explaining the situation, and if you can provide evidence that the dog is really barking at ridiculous times, include that, as the neighbor might be more willing to comply. If not, it's time to try a new tactic.
Call the police. It's embarrassing to have the police contact you about your obnoxious pet, but that's something that can be used to your advantage when it's your neighbor's dog. Tracking the dog's barking will be incredibly useful for this, as you can explain to the police that it's not a one-time occurrence. If you call the police while the dog is barking you are more likely to get a reaction from them. Remember, though that they are busy, and a barking dog is probably not high on their list of concerns.
Hire a lawyer when all else fails. You'll have the correspondence with your neighbor and the records of the barking dog, and if you called the police, a police report. This will establish that you've tried to remedy the situation and can only help your case. The court may then decide to fine the owner, force him to get rid of the dog or choose some other solution.