I will be in Florence for 3 days next month and I want to take a day to either Modena or Pisa. Any input
Why do you want to go to those two places?
You can do an easy self-guided Pisa & Lucca day trip via train. Go to the train station and purchase a ticket for Pisa S.Rossore station (it's the second in Pisa on the line from Florence but it's closest to the Duomo). Walk the 1 or so kilometer to the Duomo to the see the leaning tower. You probably won't want to spend a whole lot of time there...
Walk back to the train station and purchase a ticket to Lucca. The train station is almost directly across from a gate into this wonderful walled city. If the weather is even halfway descent, walk the entire wall - on the top side - around the city.
When you're done, walk back to the train station and purchase a ticket to go back to Firenze S.M.N.
My advise - skip Pisa entirely and just go to Lucca.
Car or public transportation? Agree with Michael, it would help to know what you intend to see in each place. If you need to see the tower and cathedral in Pisa, it's an easy 1/2 day trip by train so you could go fairly early in the morning and be back in Florence by lunch time. How long you need for Modena would also depend on what you want to see and do there. Both are pretty short train rides if that's your means of transport. I personally would hate to short change Florence with only 2 days, unless of course you've been there before.
Pisa - to see the tower
Modena - Balsamic Vinegar / Parmagiano & Ferrari
Public transportation. Never been to Florence before either
Just don't give short shrift to Florence. I could easily fill 3 complete days.
Lucca is one of my favorite places in Italy. I love the walled town, lots of towers to climb, rented a bicycle to ride on the top of the wall around the city. I could have spent a couple more days there - just relaxing.
I'm in Michael's camp here: Florence itself has TONS to offer if you're interested in those things.