I am working out a Fourier Series problem and I saw that the suggested solution used
$\sin(n\pi) = 0$ and $\cos(n\pi)=(-1)^n$ to simply the expressions while finding the Fourier Coefficients $a_0$, $a_n$, $b_n$.

I am aware that the $\sin(x)$ has a period of $2\pi$. So I am thinking that every half of period, the graph of $\sin(x)$ has to cut through the $x$ axis thus giving us the value $0$. Am I right to think that way or is there some more important reason for that?
Also, how do they come up with $\cos(n\pi) = (-1)^n$?

As you can see from the plot you included $\sin(n\pi) = 0$ for any integer $n$.
Also, $\cos(0) = 1$, $\cos(\pi) = -1$, $\cos(2\pi) = 1$, etc. So $\cos(n\pi) = 1$ for $n$ even and $\cos(n\pi) = -1$ for $n$ odd, which is also true for $(-1)^n$.