The New York City Opera performs at the NY State Theatre. That's the one on your left as you stand on the Broadway sidewalk and look at the complex. By subway it can reached by the IRT line (7th Avenue) Local trains either #1 or 9. Get off at the Lincoln Center stop.
The dress code is not evening gowns and tuxedos, nor is it sweatpants and sneakers. Many patrons wear business attire but many others don't wear ties either and women are seen wearing slacks and that's fine too.
A good guideline might be to dress comfortably but as you believe appropriate for attending a performance at one of the world's preeminent performing arts venues (Lincoln Center).
If the weather is anything like what we're now experiencing in New York, you'd be best off with a heavy sweater and insulated boots. In times like these, warmth is more important than dress codes.