Resonances and symmetries in photonics