You can sue. However, unlikely to win for an intervening criminal action. Also, did you have renter's insurance? Consult with a local landlord tenant lawyer. Good luck.
If this answer is helpful, then please mark the helpful button. If this is the best answer, then please indicate it. Thanks. For further information you should see an attorney and discuss the matter completely. If you are in the New York City area, then you can reach me during normal business hours at 718 329 9500 or www.mynewyorkcitylawyer.com.
Your ability to sue the landlord for the loss resulting from the burglary depends on the terms of your lease and whether or not you can prove that you or some other person notified the landlord of the broken latches and other security issues in the building.
You should call the New York City Bar Association's Lawyer Referral Service to get he names of some attorneys who can evaluate whether or not you have a viable case.
You may sue the landlord for the amount of your loss after deducting any recovery from your renter's insurance coverage.
In Small Claims Court you would need proof of your notification to the landlord of the defective conditions of the locks on the windows. If you did not notify the landlord about the defective window locks there may be a report of a violation for the defect if the apartment had been inspected by the NYC Office of Code Enforcement.
You could check here to determine if there are existing violations in the building for the windows and security camera, lock on the gate and the open super entrance at:
Look for the menu item for "Complaints, Violation & Registration Information"
Check how to start a Small Claims Court case at:
The answer provided to you is in the nature of general information. The general proposition being that you should try to avoid a bad outcome if you can.