And sure, this could be an email (all of the same principles would apply), but a letter makes things official in every sense. It also gives you a prop to take along to the face_to_face meeting with your boss, when you let him or her know that you're leaving.
Breaking up is hard to do, but pouring your heart out on paper is rather awkward. There is really no need for any other information in your resignation letter (including a reason __ which is completely optional). No effusive template and formatting effort is required. This is not a letter that is going to be hanging on anyone's wall, and it probably won't even be filed away!