Whether you were actively looking for the next chapter in your career journey, or an opportunity came your way unexpectedly, your resignation letter should indicate that you are moving onto something new.
If you feel it is appropriate, you can give reasons for why you accepted the new opportunity as this may help them retain future employees who join the team.
There may not be any particular reasons other than you have received a better career opportunity, so this type of letter should be positive about your time with the company.
Remember to thoroughly proofread your letter before sending it. It will remain on file at your old company and is a reflection of you as a professional.