If you intend to make a claim against your employer, you should indicate in the resignation letter your reason for leaving the position. However, keep the explanation brief. Too many details may actually be detrimental if you seek unemployment compensation or pursue other claims against the employer.
Additionally, if you are leaving the position on good terms with the employer, it may be best not to include any reason at all, or simply say that you are leaving "for personal reasons" or "to take another position." These types of reasons are less likely to create hostility, and more likely to help in getting a favorable recommendation from the employer.
You may wish to seek unemployment benefits after the resignation. However, you are not automatically entitled to benefits in every situation. If you leave voluntarily and for personal reasons or to take a position with another employer, you are probably not entitled to unemployment compensation benefits. If you are fired or forced to resign because of some misconduct, you likewise may not be entitled to unemployment compensation benefits. But if you are terminated for reasons beyond your control, such as a reduction in force, then you are likely entitled to unemployment benefits.
If you resign due to some sort of mistreatment or discriminatory practices of the employer, then you should indicate BRIEFLY what sort of conduct or conditions led to your resignation. For example, you may feel that you were discriminated against because of age, or the environment in the workplace may be hostile due to sexual discrimination or harassment. There are many federal, state and local laws to protect workers against unfair and discriminatory employment practices. Contact a lawyer, the local Equal Employment Opportunity Commission office, or other human rights office in your area. There are deadlines that apply to discrimination complaints, so it is advisable to act promptly.