I assume you're talking about a normal month-to-month lease, not breaking a long-term lease. In that case it doesn't have to be very formal, just a typed business-style letter to either the on-site property manager or, if you don't have one of those, to the address where you send your monthly rent check. I would include the following information: your current name and address, move-out date, phone number so they can contact you about the walk-through (to inspect the property before you move out -- and if at all possible, you want to be there when they do this, not move out first and then let them decide whether to withhold part of your deposit because of some minor damage you may or may not have caused), and the address where you will be receiving subsequent corresponsdence, i.e., where they should send the check for your deposit. If you have any questions about the move-out process (e.g., whether you or they are responsible for cleaning, at what times movers can access common areas such as basements or shared garages, what to do with the keys), you can also list them in the letter.
And... this may sound silly, but don't forget last week's postage increase. I did (duh) and am expecting to get some mail back. :-)