New York, where it's located

The climate of New York is continental, with cold winters and hot summers.
The daily average temperature ranges from 0.5 °C (33 °F) in January to 24.5 °C (76 °F) in July. Here are the average temperatures.
New York - Average temperatures
Min (°C)-3-22712182020161050
Max (°C)451016222629282418126
Min (°F)272836455464686861504132
Max (°F)394150617279848275645443

The city lies on the coast, but it's also on the edge of a continent that cools down in winter and heats up in summer, and where different air masses collide: the cold ones coming from Canada and the warm ones coming from the Gulf of Mexico. The result is an unstable climate, with waves of bad weather alternating with clear and sunny days. The wind blows frequently as well.
Precipitation is abundant: in one year, more than 1,200 millimeters (47 inches) of rain fall. Here is the average precipitation.
New York - Average precipitation

Winter, from December to February, is cold: the average temperature is just above freezing (0 °C or 32 °F), but cold spells, during which the temperature can drop to about -10/-15 °C (5/14 °F), are not rare. The wind chill can make the air feel colder than it actually is.
Snowfalls are frequent, and sometimes can be abundant, resulting in real snowstorms. On average, 66 centimeters (25.8 inches) of snow fall annually. On other occasions, the wind can blow from the south, bringing some mild days, with highs around 12/15 °C (54/59 °F). There are also clear and sunny days, with cold nights, and daytime temperatures mild or in any case acceptable.

In spring, from March to May, the weather continues to be unstable: the first warm days alternate with the return of cold weather. In March, it can snow, and this can sometimes happen still in early April. But already in April, the temperature can sometimes exceed 25 °C (77 °F). By May, the average temperature becomes pleasant, although there can still be cool days, or even a little cold and rainy, while the first heat waves can bring the temperature above 30 °C (86 °F). On sunny days, the first afternoon thunderstorms can erupt.

Summer, from June to August, is hot, especially in July and August. However, there are different situations also in this season: cool days, maybe rainy as well, with highs around 23/25 °C (73/77 °F), alternate with hot days, with highs around 28/30 °C (82/86 °F). On sunny days, thunderstorms can occur in the afternoon. Sometimes, even heat waves occur, when the temperature reaches 35/38 °C (95/100 °F), and remains high at night, around 23/25 °C (73/77 °F) or above.

Autumn, from September to November, is milder and less unstable than the other seasons, at least in the first part. In early September, the weather is often still characterized by heat and humidity, with sunshine and some afternoon thunderstorms, then it quickly becomes mild and relatively quiet until mid-October, while in the second half of October, the first cold days may occur. November is by now a cold month, during which the first snowfalls may occur. There is a moderate amount of rainfall also in autumn, but it is still the season in which rainy days are a little less frequent.

New York, 5th Avenue

The amount of sunshine in New York is good in summer, but it's not low even in winter because, as mentioned, some sunny days can always occur. Here are the average sunshine hours per day.
New York - Sunshine

The sea at Long Beach is never very warm, however, it can be considered as warm enough for swimming in July and August, when the water temperature reaches 22/23 °C (72/73 °F), while it becomes definitely cold in winter. Here are the average sea temperatures.
New York - Sea temperature
Temp (°C)75571117222320171310
Temp (°F)454141455263727368635550

Best Time

The best times to visit New York are spring and autumn, in order to avoid both the winter cold and the summer heat, and in particular, the month of May and from mid-September to mid-October. June is often a good month as well, but sometimes it can be hot. In early September, the weather can be sticky, though not as hot as in midsummer. In April, it can sometimes be cold and the weather can be unstable, especially at the beginning of the month, while the second half of the month is usually mild.
In autumn (usually around late October), in the parks of the city, you can admire the beautiful colors of the trees losing their leaves (the phenomenon called fall foliage).