If you have a dog that decides it is going to bark its head off every night it can be a real problem. Neighbors just do not like noisy dogs and if you don't want to fall out with the people who live near to you, then you need to make sure that your dog is not keeping them awake.
If your dog stays in the house at night then try to find out what it is that is bothering him, some dogs settle better if they have at least one downstairs light on. Some dogs bark if they hear traffic at night, your dog thinks it is its duty to keep guard when the rest of the house is sleeping. One way of avoiding at least some of the problems is to restrict your dog to one area of the house, preferably away from the noise of traffic and people passing by.
If the barking continues then you could try speaking firmly to the dog, telling him no, shows that you are displeased and often this is enough to stop the problem. If the dog is obedient to your command then reward that appropriate behavior with a treat. If your dog already associates treats with pleasing you, your job will be much easier. Never shout at a barking dog because this is liable to make matters worse, rather than better.
If you live in the countryside or you have a large yard, you might prefer to have your dog sleep outside at night, especially in the warmer weather. Try to find out whatever it is that is disturbing him at night, if there doesn't seem to be anything in particular then if possible move his kennel a bit nearer the house.
If you can't stop the dog barking at night and you don't want to bring the dog inside at night then you could try an anti-bark collar, although this is not highly recommended as it gives the dog a small electrical charge when the movement of his throat signals an oncoming bark. Some dog trainers have been using anti-bark collars for a long time, so I suppose it is largely a matter of choice, they certainly don't do any physical harm, it's just an unpleasant sensation.
There may be occasions when a normally quiet dog is barking its head off, if this is the case then you may need to investigate the situation over a couple of nights to see if there is anything unusual occurring. The fact of the matter is that barking is your dog's way of communicating and they may be trying to tell you something is wrong, or at least different to what is normally the case.