By means of analytical and numerical methods we analyze the phase diagram of polaritons in one-dimensional coupled cavities. We locate the phase boundary between the Mott insulating and the delocalized phase of polaritons, discuss the behavior of the polariton compressibility and visibility fringes across the critical point, and find a non-trivial scaling of the phase boundary as a function of the number of atoms inside each cavity. We also predict the emergence of a polaritonic glassy phase in presence of on-site random fluctuations in such a number.