Map from Google - New_York

The climate of New York is continental, with cold winters and hot summers.
The average temperature in January is 0.5 °C (33 °F), that of July is 24.5 °C (76 °F). Here are the average temperatures.
Average temperatures - New York
New YorkJanFebMarAprMayJunJulAugSepOctNovDec
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 rains are abundant: in one year, more than 1,200 millimetres (47 inches) of rain fall. Even wind blows frequently.
Here is the average precipitation.
Average precipitation - New York
New YorkJanFebMarAprMayJunJulAugSepOctNovDecYear
Prec. (mm)95801101151051101151151101101001001270
Prec. (in)

Winter, from December to February, is cold: the average temperature is just above freezing (0 °C or 32 °F), but cold spells, in which the temperatures can drop to about -10 °C/-15 °C (14/5 °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, about 60 centimeters (15 inches) of snow fall annually. On other occasions, wind can blow from the south, bringing some mild days, with highs around 12 °C/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 still snow, and sometimes this can happen even in early April. But already in April sometimes the temperature can exceed 25 °C (77 °F). In May, the average temperatures become 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. Even in this season, however, there are different situations: cool days, maybe even rainy, with highs around 23/25 °C (73/77 °F), alternating with hot days, with highs around 28/30 °C (82/86 °F). Sometimes even heat waves occur, in which the daytime temperature can reach 35/38 °C (95/100 °F), and even the night-time temperatures remains high, around 23/25 °C (73/77 °F) or above. The amount of sunshine during the summer is good, although, in addition to the passage of some weather disturbances, there's no shortage of afternoon thunderstorms.

Autumn, from September to November, is a less unstable season than the others, 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, and the first snowfalls may occur. There's no shortage of rain also in autumn, but this is still a relatively dry season, at least in frequency.

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. On average there are 10 hours of sunshine per day in June and July, and 5 in December and January.

New York, 5th Avenue

For swimming, the sea in Long Beach is never very warm, however, it can be considered warm enough for swimming in July and August, when its temperature rises to 22/23 °C (72/73 °F), while in winter it gets definitely cold. Here are the average sea temperatures.
Sea temperature - New York
New YorkJanFebMarAprMayJunJulAugSepOctNovDec
Sea (°C)75571117222320171310
Sea (°F)454141455263727368635550

When to go

The best times to visit New York are spring and autumn, to avoid the winter cold and the summer heat, and in particular the month of May, and from mid-September to mid-October. Even June is often a good month, but sometimes it can be hot. In early September there can be a sticky heat, though not as intense 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) you can admire the beautiful colours of the trees shedding leaves (the phenomenon called fall foliage).