It all depends on your time to get through customs at Newark. It should be fairly quiet around that hour. I'd recommend the CoachUSA bus to take you into Manhattan. It picks you up from the terminal (vs. airtrain to the rail station that adds a transfer) and then drops you off closer to your UN area destination at 41st and Lexington (Grand Central). Last bus leaves Terminal A at 20:45 and should be at Terminal B by 20:50.
On the way back, i'd definetely recommend a train versus the bus. It depends on where exactly you are. The LIRR trains are nice, leaving from 46th/Madison - which is a bit further west than the UN. If you are much further east, consider just taking the subway from Lexington/3rd Ave and 53rd. Right now both the E and F express trains run from that station and will take you to the JFK Airtrain at Jamaica.