Superconducting circuits have emerged as a competitive platform for quantum computation, satisfying the challenges of controllability, long coherence and strong interactions between individual systems. Here we apply this toolbox to the exploration of strongly correlated quantum matter, building a Bose-Hubbard lattice for photons in the strongly interacting regime. We develop a versatile recipe for dissipative preparation of incompressible many-body phases through reservoir engineering and apply it in our system to realize the first Mott insulator of photons. Site- and time-resolved readout of the lattice allows us to investigate the microscopic details of the thermalization process through the dynamics of defect propagation and removal in the Mott phase. These experiments demonstrate the power of superconducting circuits for studying strongly correlated matter in both coherent and engineered dissipative settings. In conjunction with recently demonstrated superconducting microwave Chern insulators, the approach demonstrated in this work will enable exploration of elusive topologically ordered phases of matter.