Every time I've flown into JFK Airport from the east I've noticed that the plane takes a weird zigzag path over Long Island. Why is this? Is it because of noise laws?
There are 3 STARs (Standard Terminal Arrival Routes) into JFK that cross over Long Island:
None of these have particularly pronounced zigzag patterns, so what you describe is probably not coming from the waypoints of the arrival procedure.
Looking at flightradar24.com, we can currently see BAW1 approaching JFK:
This already looks a bit more like a zigzag. It would seem they are arriving on the PARCH3 or ROBER2 until ROBER and then received radar vectors onto final approach for runway 31L/R. These vectors are typically given by ATC (Air Traffic Control) for spacing reasons.
When going back to yesterday evening using flightradar24's Playback feature, one finds much more pronounced turns over Long Island (thanks to ymb1 for suggesting this):
Here, aircraft are approaching runways 22L/R. You can see that there are also aircraft from the South and West joining the queue to land and ATC needs to make sure there is enough separation between the aircraft. The easiest way to achieve this is by instructing them to fly in a certain direction ("radar vectors") until there is enough space to fit them into the queue, which results in such a zigzag pattern.
Such turns can also be more localized than shown here. See e.g. Why did my LGA-ORD flight make an S-shaped turn round the time it was passing a storm?, where a flight into Chicago made an S-shaped turn during the descent, which would also feel like a zigzag. Such instructions can also be given to aircraft while they are still flying on the STAR over Long Island, especially when there is a lot of traffic during peak hours.