Founder here, and I did this run more times than I can count in my island-hopping years, so let me lay it out straight.
Short answer: for November, book it now, do not wait, and use the official channel, not the agent shop. Advance booking opens sixty days before departure on the State Railway of Thailand's own site (their D-Ticket system, dticket.railway.co.th). So a night train in mid November comes on sale around mid September. The good second class air con sleeper berths on the popular evening departures go first in high season, sometimes within days, so the honest move is to be ready the moment your date opens rather than hoping in October. In September or the rainy low season you genuinely can walk up and buy a bed close to the day, which is where that "just turn up" advice comes from. It is real, just not for your dates.
On the classes, since that's where everyone gets lost. Second class air con sleeper is the sweet spot: a seat by day that staff convert into a curtained bunk at night, and it is what most travellers want. Within that, lower berth is wider, has the window and costs a bit more; upper berth is cheaper, no window, and you're up a small ladder. As a rough guide for the long Bangkok to Surat Thani leg, second class air con runs somewhere in the region of 700 to 1,100 baht depending on berth and which train, and first class, a private two berth cabin on the trains that carry one, more like 1,300 to 1,800 baht. Third class is fan seating only, so no bed, fine for a daytime hop, wrong for an overnighter. Treat those numbers as ballpark, not a quote: they drift, and the exact fare shows on the official site when you pick your train.
Two things worth planning around. First, the train reaches the mainland, usually Surat Thani town or the nearby junction, in the morning, and from there it's a connecting bus to the pier and then a ferry across. You can buy a combined train, bus and ferry ticket through to Koh Samui, Koh Phangan or Koh Tao in one go, which is much less stressful than improvising three legs half asleep, and the ferry side is run by the fast boat operators rather than the railway, so a through ticket just bundles them. The mechanics of that hop are written up in Bangkok to the islands if you want the whole chain. Second, the "saves a hotel night" maths only works if you can actually sleep on a moving train, which not everyone can, so weigh that honestly against a cheap flight before you commit for the romance of it.
I won't tell you which train or berth is right for your particular trip, because that depends on your date, your budget and whether you're solo, but the full rundown of how the overnight services work is in overnight trains Thailand. Confirm the live times and the current fare on the railway's own site before you count on any of it.