Formal letter writing is governed by etiquette, which lays out rules regarding style and format, but that etiquette doesn't necessarily apply to personal letters. Business letters, however, do follow etiquette; the question is whose? When it comes to the intricacies of letter-writing etiquette, differing opinions abound, but addressing two different people in the same letter doesn't have to be awkward or confusing.
Personal letters are, by definition, informal. You don't need an inside address at the top of a personal letter; you can just start with "Dear Jane and John." In the body of the letter, if comments are intended for one or the other, simply use the recipient's name: "John, I read an article the other day I think you'd really enjoy," or "I really enjoyed our phone call last week, Jane." However, chances are, if you are writing a personal letter, the information you are conveying is intended for both recipients.
Formal Letters---Two People, Same Address
Formal letters require an inside address. If your recipients are coworkers at the same address, list each name on a separate line, omitting titles (unless they are both short and will fit on the same line as the name). Then, according to the Gregg Reference Manual, Tenth Edition, type only the address elements common to both beneath the names. Your salutation would then list the names in the same order as the address.
Formal Letters---Two People, Different Addresses
According to the Gregg Reference Manual, to send the same letter to two people at different addresses, list the names, titles, and addresses separately, in block format, one under the other, with a blank line between. Or, you may list the separate address blocks side by side.
Etiquette and protocol expert Cynthia W. Lett states that addressing one letter to two recipients is never correct. She advocates sending the same letter to each recipient, with only that recipient's name and address on the letter. At the bottom of each letter, then, you would indicate that a courtesy copy was sent to the other recipient. The Gregg Reference Manual also suggests that if the letter has many addressees, it may be more appropriate to address separate letters to each person and place a distribution block at the end of the letter.
However, according to the University of Northern Iowa (UNI) College of Business Administration, if there are multiple addressees, all names and addresses should appear on the letter, and each should receive an "original" copy of the letter. UNI cautions a letter writer not to confuse addressees with people who will receive a courtesy copy of the letter for informational or other purposes.
Your best course of action is to pick a style and stick with it or follow the guidelines set by your organisation. Many companies have their own style of writing---and guidelines to go with it---which may or may not follow traditional letter-writing etiquette.