You probably shouldn’t inform his/her parents but if you do the letter could look like this:
Dear Mister and Miss (last name)
I’d like to inform you that (friend) has been skipping class recently and while I know it’s not really my business I’d like you to know because there could be some serious consequences. They could be punished by the school with out of school detention or expulsion which would go in their permanent record, aside from that fact if they miss too much they may not be able to graduate on time thus sending them to summer school or getting held back a year.
I am informing you for their own benefit because I am truly worried.
Respects, (me)