We consider a family of Cuntz-Pimsner algebras associated to self-similar group actions, and their Toeplitz analogues. Both families carry natural dynamics implemented by automorphic actions of the real line, and we investigate the equilibrium states (the KMS states) for these dynamical systems. We find that for all inverse temperatures above a critical value, the KMS states on the Toeplitz algebra are given, in a very concrete way, by traces on the full group algebra of the group. At the critical inverse temperature, the KMS states factor through states of the Cuntz-Pimsner algebra; if the self-similar group is contracting, then the Cuntz-Pimsner algebra has only one KMS state. We apply these results to a number of examples, including the self-similar group actions associated to integer dilation matrices, and the canonical self-similar actions of the basilica group and the Grigorchuk group.