No booking. Only Regional (commuter) trains travel that route and there is no need to book those type of trains, they are likely a subway or a commuter train in the US, Just purchase ticket on the spot (also via Trenitalia app).
Once in Pisa you need less than 30 min to walk (or bus) to the Piazza dei Miracoli (or less by taxi, but more expensive). Once there the things to see are the leaning tower, the cathedral, the baptistery, and possibly the camposanto (monumental cemetery). You will be done by lunch. Have lunch in town, then make your way back to Florence, I see no reason to stay beyond that for dinner.
However many people couple the visit in Pisa with a visit of nearby Lucca, which in my opinion is prettier and more interesting. If you plan to do the same, I would start with Lucca in the morning, then proceed to Pisa in late afternoon (a couple of hours or three are enough for Pisa). Then you can have dinner and head back to Florence. There are over 60 trains a day in each direction between Pisa and Florence, the last one after 11pm.