Probing and controlling topological phases of matter with light