Barking can be present for a number of reasons, depending on the dogs emotional state of mind at that time. Barking due to a lack of stimulation can be a common reason when the owner is at work for example.
Barking to protect a perimeter if a dog is left outside can also be problematic and can be resolved quickly through management of the dog's physical whereabouts.
There are other types of barking too, such as that associated with separation anxiety and this can be very much stress related.
Dogs that learn that barking is productive can carry on for much longer than you would think is possible in a dog. A dog can lose its voice by too much barking! Excessive barking through play in the garden on a Summer's day can also be seen as problem barking especially if you're a neighbour relaxing in the garden for example.
Excessive barking in your absence can lead to complaints.
If your dog's barking causes a serious nuisance to neighbours, the local authority can serve a noise abatement notice, which if unheeded can result in you paying fines and legal expenses. I've taken many a phone call after the post man has delivered such a notice.
Problem barking can normally be resolved swiftly when we understand the root cause. Also see separation anxiety page.