By brute force: $\rm\: mod\ 3\!:\ 0^2 \equiv 0,\ 1^2 \equiv 2^2\equiv 1\: $ so $\rm\: a^2 + b^2 \equiv 1\:$ or $\,2\ $ if $\rm\ a\ or\ b\not\equiv 0$.
Therefore we conclude that $\rm\ a^2 + b^2 \equiv 0\ \Rightarrow \ a\ and\ b\equiv 0$
By theory: if wlog $\rm\ b\not\equiv 0\ $ then $\rm\ a^2\equiv -b^2\ \Rightarrow\ (a/b)^2 \equiv -1\ $ contra $\rm\ x^{2\:}\: \not\equiv -1\ \ (mod\ 3)$.
This proof works in every field where $-1$ is not a square, e.g. integers mod $\rm\ p = 4n+3\ $ prime, as per the 1st supplement to the law of quadratic reciprocity or, more simply, by Euler's Criterion, as explained at length here. See also here.