Very few trains stop at Cha Am and the ones that do are slow, Ordinary ones. If you plan on going directly to the airport my choice would be to take a taxi or limo.
Somewhere in the region of 2,500 baht. You can book a taxi at your hotel or with the likes of Oriental Escape.
You could use Bell Travel Service bus which stops at the Bus Stop in front of Government Savings Bank at Cha-am Intersection and goes direct to suvarnabhumi airport.