This question has been asked once in this forum, but I don't understand some things in the proof of one direction. I marked them in bold:
${\Longleftarrow}:$ Let $\lambda\in\sigma(N) $ be an isolated point in $\sigma(N)$. We will show in general that then $\text{ran} (N-\lambda I)$ is a closed space. Define $F$ as a continuous function that is 1 near $\lambda$ and $0$ on $\sigma(N)\backslash\{\lambda\}$ (for example a mollifier). So, $F$ is either 1 or 0 on the spectrum, which means that $P:=F(N) = E(\{\lambda\})$ ($E$ is the unique spectral measure of $N$ given by the spectral theorem) is an orthogonal projection. Clearly $(N-\lambda I)P=0$ because $H(z)=(z-\lambda)F(z)$ vanishes on $\sigma(N)$.
Let $Q=I-P$. Then $Q(N-\lambda I)=(N-\lambda I)$, which means that the range of $N-\lambda I$ is contained in the range of $Q$ (since the multiplication is the composition in this space). Define \begin{align*} G(z) = \begin{cases} 0, & z = \lambda, \\ \frac{1-F(z)}{z-\lambda}, & z\neq \lambda.\end{cases} \end{align*} Then $(z-\lambda)G(z) = 1-F(z)$, which gives \begin{align*} (N-\lambda I)G(N) = Q. \end{align*} So the range of $N-\lambda I$ equals the range of $Q$, which is a closed subspace (since $Q$ is also an orthogonal projection).