In a formal thank you letter, you should include a comma after the salutation. For example, if the letter is addressing "Dear Mr. Smith," you would place a comma after "Smith," like this:
Dear Mr. Smith,
If you are using a more formal salutation, such as "Dear Sir or Madam," you would also place a comma after that:
Dear Sir or Madam,
In summary, always use a comma after the salutation in a formal thank you letter.