Basic of a Resignation Letter. There's no need to sugarcoat or get creative in the beginning; just state the position you're resigning from and the effective date. While you probably shared with your boss your reasons for leaving, you don't need to describe them here__keeping it simple is perfectly fine.
Your End Date. The most crucial detail in a resignation letter is your end date. Legally and according to your company's policy, you might be required to give a minimum amount of notice (two weeks, or possibly more, depending on the company and the role). If that's the case, you don't want there to be any confusion about how much notice you give. If it's right there in writing in a letter dated two weeks before your last day, you're saving yourself the hassle.