I use my notebook and put it on my lap, which allows me to write code quite comfortably. I listen to music in order not to be distracted by other passengers. Tethering via my phone, having a reliable connection and an unlimited data plan means I can do pretty much anything. If I'm on a train for a longer period of time, we also have power plugs to recharge.
However more recently, I have switched to reading books. My nearly two-hour commute every day is the time where I can read w/o anything else going on.