The distinction between equation and identity is a bit blurred. Just avoid it and ask yourself
for what values of $x$ is $(-1)^x=1$ true?
Now realize that this is not so well defined: where is $x$ supposed to be chosen from? The integers? In this case the solution set is “the even integers”.
The reals? Oh, well, it's not possible to sensibly define $(-1)^x$ for an arbitrary real $x$. Some admit this is possible when $x=a/b$, for coprime integers $a$ and $b$, with $b$ odd. In this case the solutions are the fractions $a/b$ with $a$ even and $b$ odd.
There is another possibility: that we interpret this in the complex numbers, with the caveat that $(-1)^x$ can take on several values, possibly infinitely many. We might ask
for what complex numbers $x$ does a determination of $(-1)^x$ equal $1$?
How can we compute $(-1)^x$? It is $e^{x\log(-1)}$, where $\log(-1)$ is any determination of the logarithm. Since $-1=e^{i\pi}$, its logarithms have the form $(\pi+2k\pi)i$, for integer $k$. If $x=u+vi$, with real $u$ and $v$,
$$
x(2k+1)\pi i=-(2k+1)\pi v+(2k+1)\pi u i
$$
and so
$$
e^{x(2k+1)\pi i}=e^{-(2k+1)\pi v}e^{(2k+1)\pi u i}
$$
In order this to equal $1$, we need $v=0$. We also need
$$
(2k+1)\pi u=2h\pi
$$
for some integer $h$. This yields
$$
x=u+vi=u=\frac{2h}{2k+1}
$$
which is the same solutions we found above.