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.
A Gracious Tone. Your resignation letter is not the time to air grudges, take passive_aggressive shots, or otherwise be unpleasant. Regardless of how you feel about your (soon to be former) job or your boss, this letter should be an exercise in professionalism and graciousness. An excellent way to do that is to say a simple "thank you." Even if you hated your job, you got something from it at some point. Focus on that positive bit if you need to.