js,
As previously mentioned, most of the trains on that route will be a Regionale or Regionale Veloce, so there's absolutely no need to buy advance tickets. No reservations are possible and there won't be any discounts on the tickets. I often buy tickets the day prior to travel but you could easily buy them on the day of travel. I normally just use the automated Kiosks to buy tickets, but you could also buy at the staffed ticket office at Firenze SMN (often a long queue).
As you haven't travelled in Italy before, one very important point to mention is that with locally purchased Regionale tickets, you MUST validate (time & date stamp) the tickets prior to boarding the train on the day of travel. If you forget, you'll be subject to hefty fines which will be collected on the spot! This also applies to Metro and Bus tickets. When you buy Regionale tickets, you also MUST specify the date of travel, as the tickets will ONLY be valid for that day.