Train 173 from Hual Lamphong Railway Station in Bangkok to Hua Hin beach, is one of the cheaper SRT Rapid services, departing in the late afternoon.
3rd Class seats in a fan cooled carriage:
2nd Class seats in a fan cooled carriage:
2nd class day and night coach:
For this short journey, your best option is to buy a seat either in 3rd class (if you are on a budget), or for a little more comfort (reclining seat), 2nd class seat coaches offer the best value for your money (they are also much less crowded).
It is not really worth paying the extra to travel in one of the Day and Night coaches unless you need air-conditioning (you are paying extra fixed fees for a bed which you will not use).
If you want to travel in the cheap 3rd class carriages, you can book your seats on the day of departure from Hua Lamphong station.
If you want to travel in any of the 2nd class seats, it is always best to book your seats in advance.
To book tickets in advance in Thailand, you can:
1) Visit any SRT railway station ticket counter / office in person.
Hua Hin train station is located right in the centre of town, just a few minutes walk away from the main road that runs through town, then another few minutes walk to the beach.