An appellate judge has ruled that the New York State Insurance Department must submit for court review emails sent between its ex-commissioner and four aides as it defends a suit by 18 banks claiming $5 billion in damages from the department’s decision to let bond insurer MBIA reorganize.