If the dog barking all night is affecting your life, it is almost guaranteed that other people within the vicinity are also being affected. Keep the letter cordial, but be firm, and plainly state that although you do not want to escalate the situation, you will if need be. Have all neighbors that have been affected and are willing, sign the document.