Dear {Mrs./Mr. Teacher Last Name},
I am very sorry that I {behavior} in class. I know that this was wrong because {explanation}. I am being punished with {punishment} and I will never {behavior} ever again.
I like your class very much because of {class activity}. It makes me very sad that I made you punish me. I promise to be a better student in the future.
Your student,
{Sender}