Polynomials in more than one variable do not generally split into factors, even if you allow complex coefficients. For example, $x^2 + y^2 - 1$ doesn't split in this way.
For quadratic polynomials you can appeal to the Hasse-Minkowski theorem, the Chevalley-Warning theorem, and Hensel's lemma to determine when a solution exists; this argument is described in more detail in the beginning of Cassels' Lectures on Elliptic Curves.
Beyond the quadratic case, this problem is open. Already for cubic polynomials in two variables it is not known whether there exists an algorithm which provably solves this problem, although there appear to be algorithms which work reasonably well in practice. Bjorn Poonen's Computing Rational Points on Curves contains a good discussion of the issues involved. See also, for example, this MO question.
Note that Fermat's Last Theorem can be phrased as the problem of finding rational points on the family of Fermat curves $x^n + y^n = 1$, so there's no reason to expect that this is an easy problem if you believe that Fermat's Last Theorem is difficult.