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.
Your End Game. When you hand in your resignation, it can kick off a bit of chaos__your position will need to be filled, but your duties will also need to be covered until they can replace you. As part of your resignation letter, it's a good idea to convey what your availability is during that transitional period.