Valter Moretti's answer is very nice, and I learned some things from reading it. This answer is meant to be a lower-level explanation of the basics of this topic, giving a treatment in the same style that is found when most GR texts introduce this topic.
Definition of a Killing vector
A Killing vector $\xi$ is vector field describing a symmetry of a spacetime. If we move every point in the spacetime by an infinitesimal amount, the direction and amount being determined by the Killing vector, then the metric gives the same results. A Killing vector can be defined as a solution to Killing's equation,
$$ \nabla_a \xi_b + \nabla_b \xi_a = 0,$$
i.e., the covariant derivative is asymmetric on the two indices.
Now suppose that $p$ is a tangent vector along a geodesic. By this we mean that it satisfies the geodesic equation $p^a \nabla_a p^b = 0$. This equation states not just that $p$ stays tangent to a geodesic, i.e., is transported parallelly to itself, but also that it's parallel-transported along this geodesic in an affine manner, so that it doesn't "change length" as we go along. This is an affine notion of "not changing length," not a metrical one, so it applies equally well if $p$ is null rather than timelike. For a massive or massless particle moving inertially, the momentum is a tangent vector to the geodesic in this sense.
The conserved quantity associated with a Killing vector
Theorem: Under the assumptions given above, $p_b \xi^b$ is a conserved quantity along the geodesic. That is, it is constant for a test particle.
Proof: We prove this by showing that
$$p^a\nabla_a (p_b \xi^b)=0.$$
Application of the product rule gives
$$p^a \xi^b \nabla_a p_b+p^a p_b \nabla_a \xi^b.$$
The first term vanishes by the geodesic equation, and the second term by the antisymmetry expressed by the Killing equation, combined with the symmetry of $p^a p_b$.
None of the above is changed if we scale $p$ by some factor. In the case of a massive particle, it may be more convenient to let $p$ be the momentum per unit mass, so that all expressions depend only on the geodesic.
Nowhere in this argument was it necessary to make any assumptions about whether $\xi$ was timelike, null, or spacelike.
Some special cases
Some special cases are of interest. Suppose that the metric is independent of one coordinate $x^\mu$. Then $\partial_\mu$ is a killing vector , and $p_\mu$ is conserved.
A series of further restrictions to more and more special cases: ---
If the metric is independent of $t$, where $t$ is a timelike coordinate, it's $p_t$ (a component of the covariant momentum vector) that's conserved, but it's usually $p^t$ that we call "the" energy.
When the metric is also diagonal, it's $g_{tt} p^t$ that is conserved. For the Schwarzschild metric, this is $(1-2M/r)E$, where E is the energy measured by a static observer, i.e., an observer whose velocity vector is parallel to the Killing vector. (Note that this sequence of interpretations doesn't work when the Killing vector isn't timelike.)
Null or spacelike Killing vectors: an example
To see what happens when $\xi$ isn't timelike, it's helpful to look at the special case of a photon infalling from $r=+\infty$ into a Schwarzschild black hole. Then in Schwarzschild coordinates, $ds^2=0$ gives $dr/dt=\pm A$, where $A=1-2M/r=g_{tt}$.
Outside the horizon, $dr/dt=-A$, $p^t$ is the energy measured by a static observer hovering at $r$, and the conserved quantity $p_t=p^tA$ is the redshifted energy seen by an observer at infinity.
As the same particle passes into the interior of the horizon, its trajectory now has $dr/dt=+A$, which is still negative. There are no static observers here, so $p^t$, which is negative, is not the energy seen by any observer.