If the weather is not a conderation, then there is no good or bad time to visit New York as many attractions such as museums, galleries and theatres are open all year round.
June, July and August are the height of summer and can be very hot, so the spring months of mid April and May and the autumn months of September and October are best in terms of comfortable weather - not too hot or cold!
Winters are very cold with below zero temperatures throughout December to March with plenty of snow. The city can look magical! But if you don't like the cold or snow, stay well away at this time of year!!