The best way to write any letter of appreciation is to keep it personal, sincere and short, especially if it is intended for someone who is part of a larger staff. School principals are very busy and may not have time for longer letters, so keep it memorable and within two pages.
Writing a letter of appreciation is a rare gesture for high school students, so taking time to write it makes the student stand out from the crowd. To make it more sincere, try writing it by hand with nice penmanship. This may be slightly too involved for the context; if you do not know the principal very well, stick with a printed letter.
In the letter itself, introduce yourself briefly and mention your connection to the principal. Start off by thanking him for his assistance. For the bulk of the letter, mention how that action is important and meant a lot to you. Finally, wrap up the letter with a bigger picture of his efforts at the school and thank him briefly again. Try not to get too personal unless the two of you have a close relationship. Sign it with your name and fold it neatly before sending it off.