We prove the existence of small amplitude quasi- periodic solutions of some nonlinear Hamiltonian partial differential equations, exploiting the symmetries of the systems. Our theorem is obtained requiring a Dyophantine type nonresonance condition, a standard nondegeneracy condition and assuming a regularizing property of the nonlinearity. The proof is based on the Lyapunov-Schmidt reduction method, a suitable analysis of small denominators and on the standard implicit function theorem. We apply our result to the nonlinear beam equation with spatial periodic boundary conditions, to a beam vibrating in a two dimensional space with Dirichlet boundary conditions and to the nonlinear wave equation with spatial periodic boundary conditions.