There were several waves of migration from Puerto Rico in the past 200 years, each driven by different reasons, so to properly answer your question you would have to specify which era. Initially, wealthy Puerto Ricans in the days of Spanish control did it so their children could get better educations. After the Spanish-American War, parents did it because they were no longer subjects of Spain, and eventually had the chance to be US citizens. As to why New York, well initially, that was where the steamship routes all took you, and was the easiest thing to do. Well over 60% of all Puerto Ricans in the mainland U.S. are in the New York area, and make up the vast majority of the Hispanic population there.
In general, the reasons were no different than that found in any other ethnic group that also came to the mainland U.S.