The derivation of effective light-matter Hamiltonians in the context of cavity QED is revisited and the importance of making the correct choice of gauge is demonstrated. Controversies surrounding the quantum Rabi model as to whether the ultrastrong coupling regime can be reached are resolved and the adequacy of the effective models when applied to a superconducting circuit setup is shown. The effects of finite temperatures on the superradiant phase transition and the crossover to the subradiant phase in the extended Dicke model are exhibited. Applicability and limitations of the Holstein-Primakoff approximation as well as a mean field approach to the extended Dicke model are investigated. The heat capacity of the extended Dicke model is examined for a broad range of parameters.