Your assertion can be restated in terms of the quadratic form $q(x,y) = x^2+y^2$ defined over the finite field $\mathbb{F}_p$ of order $p$ (for a prime number $p$): if $p \equiv 3 \pmod{4}$ then for all $(x,y) \in \mathbb{F}^2$, if $q(x,y) = 0$ then $x = y= 0$.
You ask for a generalization, so here is a (useful) one: let $F$ be any field of characteristic different from $2$. For $a,b,c \in F$ consider the binary quadratic form
$q(x,y) = ax^2 + bxy + cy^2$.
We say that $q$ is isotropic if there is $(x,y) \in F^2 \setminus (0,0)$ such that $q(x,y) = 0$ and otherwise anisotropic. And here we go:
(Small but Useful) Theorem: The binary form $q(x,y) = ax^2 + bxy + c y^2$ is isotropic over $F$ if and only if its discriminant $\Delta = b^2-4ac$ is a square in $F$ (meaning $\Delta = d^2$ for some $d \in F$).
Let me sketch the proof: feel free to ask if you want details. Since the characteristic is not $2$, we can diagonalize $q$ just by "completing the square". Moreover, replacing $q$ by $(1/a)*q$ changes the discriminant from $\Delta$ to $\frac{\Delta}{a^2}$ -- so does not affect whether it is a square. So we reduce to the case
$q'(x,y) = x^2 - \frac{\Delta}{4} y^2$, where the result is pretty clear:
if $x,y \in F$ are not both $0$ and $q'(x,y) = 0$, then $x \neq 0$ and $y \neq 0$ and $\Delta = (2x/y)^2$. Conversely, if $\Delta = d^2$ then
$q'(d/2,1) = 0$.
For the form $q(x,y) = x^2 + y^2$, the discriminant is $-4$, which is a square in $F$ iff $-1$ is a square in $F$. By (very) elementary number theory, when
$F = \mathbb{F}_p$ for an odd prime $p$, we have that $-1$ is a square iff $p \equiv 1 \pmod{4}$.
To see why this is useful, now let $a,b,c \in \mathbb{Z}$ and consider the binary quadratic form $q(x,y) = ax^2 + bxy + cy^2$, of discriminant $\Delta$, and suppose that for a prime number $p$ not dividing $\Delta$ we have
$q(x,y) = p$. Then $x$ and $y$ are not both divisible by $p$: if $x = pX$, $y = pY$, then $q(x,y) = p^2 q(X,Y) = p$ is a contradiction. So we find that (the reduction modulo $p$ of) $q(x,y)$ is isotropic over $\mathbb{F}_p$ and thus that $\Delta$ is a square modulo $p$. Using quadratic reciprocity, this translates in every case to congruence conditions on $p$ modulo $\Delta$.
This is really the first step of the arithmetic study of binary quadratic forms over $\mathbb{Z}$. See for instance this lovely book of Cox and these notes based on the book, in particular the first handout. In the latter reference, I call this fact the "fundamental congruence": it appears (in the special case $x^2 + ny^2$) on the very first page of the notes.