This is because $H'=UHU^{-1}$ for a certain unitary operator $U$, therefore $\psi$ is an eigenvector of $H$ with an eigenvalue if an only if $U\psi$ is eigenvector of $H'$ with the same eigenvalue. Thus the two operators have the same point spectrum. $U = e^{-i \lambda X/\hbar}$$U = e^{i \lambda X/\hbar}$.
From $[X,P]= i \hbar I$ one finds $$e^{i \lambda X/\hbar}Pe^{-i \lambda X/\hbar}= P + \lambda I\:.$$$$e^{-i \lambda X/\hbar}Pe^{i \lambda X/\hbar}= P + \lambda I\:.$$ On the other hand $$e^{i \lambda X/\hbar}V(x)e^{-i \lambda X/\hbar}=V(x)$$$$e^{-i \lambda X/\hbar}V(x)e^{i \lambda X/\hbar}=V(x)$$ As a consequence (with $\hbar=1$) $$UHU^{-1}= U \left(\frac{1}{2m}P^2 + V(x)\right) U^{-1}= \frac{1}{2m} UPU^{-1}UP U^{-1}+ UV(x)U^{-1}= \frac{1}{2m} (P+\lambda I)^2 + V(x) = H'\:.$$