Train: NYAS bus ($15, 1 hr.) to Penn Station or Airtrain to Jamaica station then E subway ($7.25, 1+ hrs) or LIRR ($13, 20-30 min) to Penn Station then NJ Transit to Princeton or Princeton Junction whichever stop is closest to your hotel.
Bus: NYAS bus to Port Authority Bus Terminal or E subway to 42nd St/Port Authority, bus to Princeton.
I'd recommend the train; cheaper, more frequency and less travel time.
Train: NYAS bus ($15, 1