When is a map inducing isomorphisms on homology with rational and mod $p$ coefficients a weak equivalence? Suppose $f \colon X \to Y$ is a map of simply connected topological spaces that induces isomorphisms on homology with rational coefficients as well as homology with $\mathbb{Z}/p$ coefficients for all primes $p$. Under what conditions is $f$ a weak equivalence?
 A: It is an exercise in homological algebra to show that your hypothesis implies a homology isomorphism in integral coefficients (Hint: use a short exact sequence involving $\mathbb{Z}/p^\infty$, $\mathbb{Z}$, and $\mathbb{Q}$). Hence, homology Whitehead applies since your spaces are simply connected.
A: Connor's answer is of course great and way more elementary than what I'm about to say, but here's maybe a second ("global") perspective on why this works: by simple-connectedness and the Hurewicz theorem, we are reduced to showing that it's an integral homology equivalence.
Hence, we are reduced to the following statement:

Let $C,D$ be chain complexes and $f: C\to D$ a map such that $f\otimes \mathbb Q$ and $f\otimes^L\mathbb Z/p$ are quasi-isomorphisms for all $p$; then $f$ itself is a quasi-isomorphism.

To prove this, consider the cone of $f$, $cone(f)$. The hypotheses imply that $cone(f)\otimes^L \mathbb Z/p \simeq 0$, so $p: cone(f)\to cone(f)$ is a quasi-isomorphism for all primes $p$. In particular, $cone(f)\to cone(f) \otimes \mathbb Q$ is a quasi-isomorphism, but the latter is $0$ by the hypothesis on $\mathbb Q$.
Therefore $cone(f) \simeq 0$ and so $f$ is a quasi-isomorphism.
This can be used to derive the arithmetic fracture square, which states that for a chain complex $C$, letting $C_p$ denote its derived $p$-completion, the following square is a homotopy pullback/pushout :
$$\require{AMScd}\begin{CD}C @>>> \prod_p C_p \\
@VVV @VVV \\
C\otimes \mathbb Q @>>> (\prod_p C_p)\otimes \mathbb Q\end{CD}$$
Now this tells you that you can essentially "always" reduce things to computations/verifications mod $p$ (in the derived sense; so $-\otimes \mathbb Z/p$ and $\mathrm{Tor}(-;\mathbb Z/p)$ appear) and rationnally.
