Escape,
As Ken noted above, there is no "inter-town" train JUST for the Cinque Terre. All of the villages are on Trenitalia routes which pass through that region - although not ALL trains stop in ALL of the towns.
So you want to use the Trenitalia website for exploring what trains are available on what day, and for around the time you're wanting to leave Pisa. You don't "have" to spend the night at La Spezia or Riomaggiore: you can stay anywhere in the CT that you've made a hotel reservation as they're all served by train.
You should also just buy your ticket in Pisa but you can explore schedules/prices in advance. Just pulling up a random day (7/8/2015) and times (19:00/7:00 - 20:00/8:00 PM) and CT town (Manarola), there's a train at 19:03 from Pisa that takes 1:08 hr with one change in La Spezia. There are other trains at other times - and ALL of them will involve at least one change - but some take longer. Depending on your final destination within the CT, some may also involve more than one change so if possible, try to plan your departure time to be able to catch the quickest, most direct trains.
If you're traveling on a ticket with NO SEAT RESERVATION (standard on regional trains) remember to validate your ticket before boarding.
As far as a day pass for the trains within the CT, we purchased a 5 km pass which was good from time of first validation until midnight of that day but that's been a few years back, and I'm unable to confirm if it's still available. If so, it can be purchased at any train station in the CT. Otherwise, individual tickets are not expensive (don't forget to validate them!).
If you intend to do any hiking, you might consider a one or two-day combo pass - Cinque Terre Treno MS - which covers the fee for using the trails; trains between the villages; local buses, including the bus which travels from Corniglia's station up the steep hill to the village; public toilets; and wifi hotspots at the stations within the park. That pass must be validated the first time you use it.
A one-day pass is € 12.00; a 2-day pass is € 23.00. It covers 2nd-class train travel between La Spezia and Levanto, and can be purchased at the stations. You don't want to validate and use one of these in the evening: wait until the morning of your first full day to get the good out of them.