Our family and friends generally followed the format of,
To whom it may concern/Dear sir/madam,
I'm writing this letter to attest to the sincerity/genuine nature/whatever of the relationship/marriage between A and B.
Then comes the part where they explain who they are (which side they're from basically - family/friends of A or B), when they first found out about the relationship, when they met the other party, any shared experiences, impressions, and the like. If they haven't met this other person due to distance, don't worry, it's okay. Just have them write that they haven't had the chance to meet them in person yet and why. And just affirm that they feel and know without a doubt that the relationship is genuine. That was usually at the end of each of our letters - the last paragraph was just affirmation and assurance of the real and genuine nature of the relationship.
And then at the end they'd put their names, contact info, print and sign it.
I think you should definitely also be able to find some examples online, I remember I googled them when we needed them.