Symmetry protected topological states (SPTs) have the same symmetry and the phase transition between them are beyond Landauʼs symmetry breaking formalism. In this paper we study (1) the critical theory of phase transition between trivial and non-trivial SPTs, and (2) the relation between such critical theory and the gapless boundary theory of SPTs. Based on examples of SO(3) and SU(2) SPTs, we propose that under appropriate boundary condition the critical theory contains the delocalized version of the boundary excitations. In addition, we prove that the boundary theory is the critical theory spatially confined between two SPTs. We expect these conclusions to hold in general and, in particular, for discrete symmetry groups as well.