Did you map directions on Google? Because the easiest one that comes up is to take bus 20 directly from Stazione Rifredi, as it goes to Piazza San Marco!
If you arrive late and bus service is no longer active, then yes, take a taxi, there should be some at the train station.