For which integers $n \geq 3$ does there exist a regular $n$-gon in the plane such that all its vertices have integer coordinates in a rectangular coordinate system?
1. **Assume there exists an $n$-gon all of whose vertices are lattice points.** 
   - We will work in the complex plane and label the vertices counterclockwise by $p_1, p_2, \ldots, p_n$.
   - The center of the $n$-gon, call it $q$, is the centroid of the vertices: 
     \[
     q = \frac{p_1 + p_2 + \cdots + p_n}{n}
     \]
   - Since all vertices are lattice points, $q$ must also have rational real and imaginary components.

2. **Consider the rotation of vertices around the center $q$.**
   - Let $\omega = e^{2\pi i / n}$ be the primitive $n$-th root of unity. Then, the vertices can be expressed as:
     \[
     p_k = q + \omega^{k-1}(p_1 - q) \quad \text{for} \quad k = 1, 2, \ldots, n
     \]
   - Specifically, for $k=2$, we have:
     \[
     p_2 = q + \omega(p_1 - q)
     \]
   - Solving for $\omega$, we get:
     \[
     \omega = \frac{p_2 - q}{p_1 - q}
     \]
   - Since $p_1, p_2, q$ are lattice points, the right-hand side (RHS) has both rational real and imaginary components.

3. **Analyze the properties of $\omega$.**
   - We know that:
     \[
     \omega = \cos\left(\frac{2\pi}{n}\right) + i \sin\left(\frac{2\pi}{n}\right)
     \]
   - For $\omega$ to have rational real and imaginary components, both $\cos\left(\frac{2\pi}{n}\right)$ and $\sin\left(\frac{2\pi}{n}\right)$ must be rational.

4. **Apply Niven's Theorem.**
   - Niven's Theorem states that the only rational values of $\cos(\theta)$ for $\theta$ in degrees are $\cos(0^\circ) = 1$, $\cos(60^\circ) = \frac{1}{2}$, $\cos(90^\circ) = 0$, $\cos(120^\circ) = -\frac{1}{2}$, and $\cos(180^\circ) = -1$.
   - For $\cos\left(\frac{2\pi}{n}\right)$ to be rational, $\frac{2\pi}{n}$ must correspond to one of these angles.

5. **Determine the possible values of $n$.**
   - The angles $\frac{2\pi}{n}$ corresponding to rational $\cos$ values are:
     \[
     \frac{2\pi}{n} = 0, \frac{\pi}{3}, \frac{\pi}{2}, \frac{2\pi}{3}, \pi
     \]
   - Solving for $n$, we get:
     \[
     n = 1, 6, 4, 3, 2
     \]
   - Since $n \geq 3$, the only possible values are $n = 3$ and $n = 4$.

6. **Verify the existence of such $n$-gons.**
   - For $n = 3$ (triangle), it is impossible to have all vertices as lattice points in a regular triangle.
   - For $n = 4$ (square), it is possible to have all vertices as lattice points (e.g., vertices at $(0,0)$, $(1,0)$, $(1,1)$, $(0,1)$).

Conclusion:
The only integer $n \geq 3$ for which there exists a regular $n$-gon with all vertices having integer coordinates is $n = 4$.

The final answer is $\boxed{4}$.