Dear (Mr./Miss/Mrs./Ms.) followed by first and last name,
Your introductory paragraph should summarize why you are writing. State that you want to congratulate the recipient on their achievement, and how you learned of the positive news. The recipient should understand from this first paragraph why you are writing.
The main body of your congratulation letter should offer your praise of their accomplishment. You might also relate any words of advice, and what significance the recipient’s achievement could hold for them. Use a professional but friendly tone in your letter.
In your closing paragraph, state your congratulations wishes one final time and let the recipient know you wish them continued success in the future. Also let them know they can feel free to contact you at any time.
Never be vague in your congratulation letter, and make it clear the exact accomplishment you are praising. In the case of a friend, use their first name in your salutation; you can also use a less formal tone in your congratulation letter.