While it's often the case that people opt to close their bank accounts in person, or over the telephone, I'm one of those people who prefer to do such things in writing. A letter to your bank asking them to close your account is straightforward enough, as long as you keep it simple.
Writing a letter to your bank to close your account
Remember to include your basic details, such as your bank account number, and the name of your account. It doesn't hurt to include your date of birth either, for identification. You can place these details in a line underneath the salutation ('Dear Sir/Madam').
As for the bulk of the letter, there's no need to be elaborate. Simply ask for your account to be closed as from the date the bank receives your letter (I'm assuming here the account is empty, or your money has been transferred to another bank). If your are closing the account as a result of poor service, then explain so. A good bank will always be willing to learn how it can improve its service to customers.
You don't have to give a reason as to why you're closing the account, but the bank may contact you if you don't, to see if there is anything they can do to rectify the situation, or survey you for your reasons for leaving (such as a better rate of interest at a competitor).
It sounds silly, but don't forget to sign your letter, otherwise the bank might not accept your request, as a signature is an important part of the ID process. Also remember to keep a copy of the letter for your personal records.
If you don't have a name of a contact at the bank, address to your letter to 'customer administration department' or similar.
A letter to a bank should be polite but formal. This YouTube film shows you how to write a good business letter: