Flight
JFK is the best Airport to fly into if you don't want to rent a car. Take JFK's Airtrain to Jamaica Station. Then take the Long Island Railroad (LIRR) via the Montauk Line, to "Hampton Bays Station." Use the MTA website- https://new.mta.info/, to plan your trip. You can purchase train tickets on the train from the conductor. Note that there are only a few trains out daily to Hampton Bays: 8:18AM, 11:41AM, 4:48PM 6:31PM, and 8:50PM. But from Jamaica Station you can also take a train to "Riverhead Station" on the "Ronkonkoma line" at 10:52AM, 2:50PM, 6:01PM. Riverhead is just a 20 min Uber ride from us.
Flight
Laguardia is 1.5 hours by car from Hampton Bays. It's a great option if you plan to rent a car. But there are no trains out of Laguardia to Long Island.