I'm a little late to this party, but here is the illustration of the method so many seem to suggest:
$$\cos(\theta) -\sin(\theta) = 1 \\
(\cos(\theta)-\sin(\theta))^2 = 1^2 \\
\cos^2(\theta) - 2\sin(\theta)\cos(\theta) + \sin^2(\theta) = 1 \\
-2\sin(\theta)\cos(\theta) + [\cos^2(\theta) + \sin^2(\theta)] = 1 \\
-2\sin(\theta)\cos(\theta) + 1 = 1 \\
-2\sin(\theta)\cos(\theta) = 0 \\
2\sin(\theta)\cos(\theta) = 0.
$$
Now we use the double-angle formula $\sin(2\theta) = 2\sin(\theta)\cos(\theta)$ to get
$$2\sin(\theta)\cos(\theta)=0 \\
\sin(2\theta) = 0 \\
2\theta = \arcsin(0) \\
2\theta = k\pi \qquad \text{where $k$ is an integer.} \\
\theta = \frac{k\pi}{2}.$$
Now to check for extraneous solutions. Since the least common multiple of the periods of the trig functions in the original equation is $2\pi$, we only need to check the values of $k$ that will cause $\theta$ to be in between $0$ and $2\pi$:
$k = 0 \implies \theta = 0. $ Then we check: $\cos(0)-\sin(0) = 1-0 =1$. It works!
$k=1\implies \theta = \pi/2$. Then we check: $\cos(\pi/2)-\sin(\pi/2) = 0-1 \neq 1$. Doesn't work!
$k=2\implies \theta = \pi$. Then we check: $\cos(\pi)-\sin(\pi) = -1-0 \neq 1$. Doesn't work!
$k = 3 \implies \theta = 3\pi/2. $ Then we check: $\cos(3\pi/2)-\sin(3\pi/2) = 0-(-1) =1$. It works!
When $k=4$, we get $\theta = 2\pi$ which is effectively the sign to stop because the values of $k$ cause their own period as mentioned before.
So altogether we see that $k=0$ and $k=3$ both work. By extending the period of 4 to these values, we get $k=0,\pm4,\pm8,\pm12\ldots$ and also $k = \pm3,\pm7,\pm11, \pm 15, \ldots$ as valid values of $k$ when $\theta = \frac{k\pi}{2}$.
So altogether and more eleganlty, as mentioned in other posts and comments, we have $\theta \in \{ 0+2\pi k$; $\frac{3\pi}{2} + 2\pi k$ | $k\in \mathbb{Z}\}$.