There are two basic reasons to write a strong resignation letter. First of all, you can benefit from the warm relationships with your former employer in the future when you might need a letter of recommendation. Secondly, this document will be an element of your employment file, take time and care to compose it in a proper way.
What is to Be Included
In general, a resignation letter informs the employer about your intention to resign and sets the date of your last day at work. A «thank you for the provided opportunities» is a standard phrase for this kind of letters and a mark of courtesy.
You don't have to dwell upon the reasons for resignation, be brief and stick to the point.
A Bit more about Reasons
Anyway, if you're completely positive about your resignation and leaving for a better place, if you are totally satisfied with the employer, you may write this all in the letter. Otherwise, if the employer troubles you and you hate your job, it's better stay formally polite and not mention the circumstances.
Why not Help
Leave your contacts, promise to help if necessary. This won't bring you any harm. Even if the company will never try to get in touch with you, your willing to help is sure to produce a good impression.
Don't cross the limits
Even if you are completely dissatisfied with your job, it's recommended to cool down and not to let your emotions run away with you. Whatever you would love to say, keep it to yourself, don't include it into the letter. Having said too much you might regret it afterwards.
Your colleagues deserve to be informed about your leaving If you want to keep friendly relationships with them, spare some time, write farewell messages, include your phone number and address if needed.