If you're getting the train from Colombo to Galle, make sure you get on at Maradana station (where the train originates). This will guarantee you a seat, whereas you'll be involved in a bunfight for seats with locals if you get on at Fort station. You can buy tickets in advance by turning up at the station - and the fares are super-cheap.