New York officials have charged a Bangladeshi immigrant with terrorism with setting off a pipe bomb Monday in a crowded commuter hub.