TITLE: The Algebra-Geometric Motivation Behind Considering The Prime Spectrum of Arbitrary Rings
QUESTION [6 upvotes]: When being introduced to algebraic geometry I was told that it is all about finding solutions to polynomial equations. In the case that we have a polynomial equation over some algebraically closed field $K =\overline{K}$, by Hilbert‘s Nullstellensatz we find that studying the irreducible algebraic sets amounts to studying prime ideals of $K[T_1,...,T_n]$.
Now, if I want to solve polynomials over, say $\Bbb R$ or even $\Bbb Z$, then this correspondence does not hold any longer. Yet by considering $\Bbb Z \subseteq \Bbb Q \subseteq \Bbb C$ we can try to solve the equations in $\Bbb C$ and cut away noninteger solutions. So in this light it seems like the classical setting of algebraic geometry is completely sufficient and we should put most of our effort into studying $\operatorname{Spec}K[T_1,...,T_n]$.
However (maybe I misunderstood?) I thought that the motivation behind doing algebraic geometry over arbitrary rings was solving polynomials over arbitrary rings as well. But since the correspondence theorem relies on Hilbert‘s Nullstellensatz I don’t see how to connect this directly to the prime spectra of such rings. 

Is there a way to make sense of this correspondence or am I on the wrong track?

Of cause the mere presence of the functor $\operatorname{Spec}:\mathsf{CRing}^\text{op}\rightarrow \mathsf{Top}$ makes the prime spectrum worth studying from the point of view of finding topological invariants for rings. And I would be fine with the geometry of the prime spectrum being a relict of / a crude analogy to the „real“ geometry in the classical setting, from which we can draw intuition and inspiration.

REPLY [5 votes]: As asked in the comments here is the explanation of geometric points and the explanation of how do you work with points in more general algebraic geometry.
Suppose $A$ is a $k$-algebra of finite type. Then $$A=k[X_1,\dots,X_n]/(f_1(X_1,\dots,X_n),\dots,f_k(X_1,\dots,X_k))\tag{$\star$}$$
for some polynomials $f_1,\dots,f_k$.
If $k$ is algebraically closed then the points of the algebraic set $V(f_1,\dots,f_k)\subseteq \mathbb{A}^n$ can be recovered from $A$ by looking at its maximal ideals. This is part of what Hilbert‘s Nullstellensatz says.
Nevertheless, there is another way of obtaining the points of $V(f_1,\dots,f_k)\subseteq \mathbb{A}^n$ from the ring $A$. This other way happens to be much easier (it is kinda tautological) and much more general than the previous one (although when $k$ is alg. closed they are equivalent of course) and goes as follows: The points of $V(f_1,\dots,f_k)$ are exactly the morphisms of $k$-algebras from $A$ to $k$. This happens because having a morphism of $k$-algebras
$$\overline{\phi}:A\rightarrow k$$
is the same as having a morphism of $k$-algebras
$$\phi:k[X_1,\dots,X_n]\rightarrow k$$
that vanishes over $f_1,\dots,f_k$. And by the universal property of the polynomial algebra, this morphism is given by fixing the values for $X_1,\dots,X_n$. That is, is given by choosing elements $b_1,\dots,b_n\in k$ such that $f_i(b_1,\dots,b_n)=0 \ \forall i$. Hence we conclude that 
$$V(f_1,\dots,f_k)=\operatorname{Hom}_{\text{$k$-alg}}(A,k).$$
But now notice the following:

We didn't use the fact that $k$ is algebraically closed, actually, we didn't use the fact that it is a field. So we can take it to be a ring.
We can use the same trick to find the solutions of the system of equations $\{f_1=0,\dots,f_k=0\}$ over any $k$-algebra. The set of all such solutions is the set of $k$-algebra morphisms $\operatorname{Hom}_{k\text{-alg}}(A,B)$.

Now this is the way which generalize to algebraic geometry over any base ring $k$. The idea is that now instead of working directly with the algebraic set $V(f_1,\dots,f_k)\subseteq \mathbb{A}^n$ you will work with the "$k$-scheme" $\operatorname{Spec}(A)$, and if you want to recover $V(f_1,\dots,f_k)$ you just have to look at the set of all morphisms $$\operatorname{Hom}_{k\text{-schemes}}(\operatorname{Spec}(k),\operatorname{Spec}(A))$$
because this set will happens to be (by definition) equal to 
$$\operatorname{Hom}_{\text{$k$-alg}}(A,k)$$
and we know that these are the solutions of the system of equations. Hence, from the scheme you get the solutions to the system of equations as morphisms. They are NOT the points of the underlying set of the schemes (this is one of the difficulties that people encounter while learning about schemes). These other points are prime ideal ideals that are not longer directly related with the solutions of the system of equations anymore. 
If $X$ is your scheme, in order to make a clear disctinction. The points in the underlying set of $X$ are called schematic points of $X$, and this are part of the engines for making $X$. The set of all morphisms $\operatorname{Hom}_{k\text{-schemes}}(\operatorname{Spec}(k),X)$ is called the set of $k$-geometric points of $X$ and is denoted by $X(k)$. More generally, for any $k$-algebra $B$ the set of $B$-geometric points of $X$ is $\operatorname{Hom}_{k\text{-schemes}}(\operatorname{Spec}(B),X)$ and is denoted by $X(B)$ (although most of the time it is customary to restrict geometric points to the case in which $B$ is a field). 
Example: Take $X=\operatorname{Spec}(\mathbb{Z}[X,Y,Z]/(X^2+Y^2-1))$, then

The set of schematic points of $X$ are the prime ideals of $\mathbb{Z}[X,Y,Z]/(X^2+Y^2-1)$ and this sounds difficult to compute...
The set $X(\mathbb{Z})$ of $\mathbb{Z}$-geometric points is $(X,Y)=\{(\pm 1,0), (0,\pm 1)\}$.
As $\mathbb{Q}, \mathbb{R}$ are $\mathbb{Z}$-algebras we can also compute the set of geometric points over this fields and we get $X(\mathbb{Q})=\{(\frac{2mn}{m^2+n^2},\frac{m^2-n^2}{m^2+n^2}); m,n\in \mathbb{Z} \text{ coprime}\}$ and $X(\mathbb{R})$ is the circle.
As $\mathbb{Z}[X]$ is also a $\mathbb{Z}$-algebra we can again compute the geometric points $X(\mathbb{Z}[X])$ and they correspond to morphisms between the integral affine line ($\operatorname{Spec}(\mathbb{Z}[X])$ is the integral affine line) and the integral circle. This shows that, with the generality we are working on, morphisms between algebraic varieties fall in the same family as points and a lot of times you will be able to apply theorems about points to morphisms.