what role did geography play in the economic success of new york

It is on the Atlantic Ocean with a good seaport, thus allowing easy shipping to and from other parts of the world, especially Europe. It's also on the Hudson River, permitting easy shipping to the northern part of the state -- and on beyond.

New York is near good agricultural land and has a favorable climate, thus having access to sufficient food.

Being on an island, made NYC fairly easy to defend against enemies.