You do not have to include any reason for your resignation. You may simply say that you are resigning. You may also want to tell your employer how long you are willing to remain on the job to allow for transition of work, etc. Good luck.
My colleague is correct. You do not have to put any reasons for your resignation in your letter. Additionally, understand that if you resign, you will not be eligible in all likelihood for any unemployment benefits in this extremely difficult economy. If you believe that there has been a "hostile work environment" and that you have be harassed based on your age, gender, ethnicity, or culture, you "might" have recourse against the employer under Title VII. Additionally, if you have been exposed to stress that has caused you to now suffer from anxiety, PTSD, depression, or another mental health condition, in all likelihood your diagnosis might fall under the Amercians with Disabilities Act and your employer is required to make "reasonable accommodations" for you in the workplace.
Mr. Jackson and Mr. Leroi give you good advice. What you wish to include in the letter will depend, in my view, on what you wish to do about what you experienced at that workplace. If, for example, you want to let bygones be bygones, then you would do well to just write a quick "I resign" letter. If you wish to pursue the matter with the Equal Employment Opportunity Commission and/or with a state human rights agency, then I cannot see any harm in including an array of information about your experiences. You would do well to consult a local attorney before writing the letter, inasmuch as your charge of discrimination will likely replicate what was stated in the letter.
Good luck to you.
Michael S. Haber is a New York attorney. As such, his responses to posted inquiries, such as the one above, are limited to his understanding of law in the jurisdiction in which he practices and not to any other jurisdiction. In addition, no response to any posted inquiry should be deemed to constitute legal advice, nor to constitute the existence of an attorney/client or other contractual or fiduciary relationship, inasmuch as rendering legal advice involves the ability of the attorney to ask appropriate questions of the person seeking such advice and to thus gather appropriate information. In addition, an attorney/client relationship is formed only by specific agreement. The purpose of this answer is to provide the questioner with general information, not to outline specific legal rights and remedies.