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.
Sure, it may sit in the depths of HR until the end of time, but you can be sure of two things: One, your former boss (and future reference) will read it and be impressed. And two, if you ever decide to come back to your company (hey, it happens), it's a very good thing that last thing on file is a great, professionally written resignation letter.