The L.I.R.R is perfect for getting to the city.
I suggest the MTA Etix and Train schedule applications to book your seats ahead of time. Or at the exact moment.