Just about everybody has lived down the street or across the hall from a dog that barks, and barks, and barks. And because dogs commonly bark when they're most bored and lonely, often the owner isn't there when the problem occurs--and thus may be blissfully ignorant that there is a problem.
Fortunately, there are a few ways to tackle this annoying problem or other dog issues such as dogs that escape from their owners's yards and cause problems, or dogs that may be dangerous. If the unaware owners are also responsible owners, then a simple talk could prompt them to fix their backyard fence, start dropping their pooch at doggie daycare, or arrange for a dog-walker to come every day (tired dogs are good dogs). If discussions don't do it, you can enlist the help of an experienced third party: a local mediator. Community mediators see lots of disputes involving dogs, and they've likely to have some good suggestions up their sleeves.
You may also be able to get help from your local animal control agency or the police. Finally, if nothing else works, you can sue the owner of a nuisance dog in small claims court. That's pretty much guaranteed to get the attention of the owner.