Train -- but it takes 4 hours +, so you might be better finding some good stop along the way to stop and rest in, then carry on in the morning (Rome is expensive, and anywhere an hour or two train journey time out from it will be a bit less so).
I'd actually suggest stopping over in either Livorno or Pisa. A morning train out from either of those to Lucca would be quick and easy, but a very late night train could be murder. Livorno is a bit less touristy, so might be a better choice, even though you'd have to likely change trains next day at Pisa.
Lucca is actually fairly out of the way and hard to travel into.