Hello hybmu, and welcome to the forums.
Generally speaking, you write a formal letter in formal situations. You would use a formal letter to a business, the government, or to a person you didn't know.
You use an informal letter informal situations: to a friend, primarily.
There are a lot...