Akhil, you're thinking of this the opposite of how I think group cohomology was discovered. The concept of group cohomology originally centered around the questions about the (co)homology of $K(\pi,1)$-spaces, by people like Hopf (he called them aspherical rather than $K(\pi,1)$ spaces, and Hopf preferred homology to cohomology at that point). I think the story went that Hopf observed his formula for $H_2$ of a $K(\pi,1)$, which was a description of $H_2$ entirely in terms of the fundamental group of the space.
This motivated people to ask to what extent (co)homology is an invariant of the fundamental group of a $K(\pi,1)$-space. This was resolved by Eilenberg and Maclane. Eilenberg and Maclane went the extra step to show that one can define cohomology of a group directly in terms of a group via what nowadays would be called a "bar construction" (ie skipping the construction of the associated $K(\pi,1)$-space). Bar constructions exist topologically and algebraically and they all have a similar feel to them. On the level of spaces, bar constructions are ways of constructing classifying spaces. For groups they construct the cohomology groups of a group. The latter follows from the former -- if you're comfortable with the concept of the "nerve of a category", this is how you construct an associated simplicial complex to a group (a group being a category with one object). The simplicial (co)homology of this object is your group (co)homology.
Dieudonne's "History of Algebraic and Differential Topology" covers this in sections V.1.D and V.3.B. I don't think that answers all your questions but it answers some.
Let $\Lambda$ be a module over a principal ideal domain $R$. The Künneth Theorem states that
$$H^n(X\times Y; \Lambda) \cong \bigoplus_{p+q=n}H^p(X; \Lambda)\otimes H^q(Y; \Lambda) \oplus \bigoplus_{p+q=n+1}\operatorname{Tor}(H^p(X; \Lambda), H^q(Y; \Lambda)).$$
If $\Lambda = R$ and $R$ is a field, then $\operatorname{Tor}(H^p(X; R), H^q(Y; R)) = 0$ as $H^p(X; R)$ and $H^q(Y; R)$ are free $R$-modules (i.e. vector spaces over $R$). For $\Lambda = R = \mathbb{Z}$, there may be some contribution from the $\operatorname{Tor}$ terms.
In this case, $X = Y = S^2$ and
$$H^p(S^2; \mathbb{Z}) = \begin{cases}
\mathbb{Z} & p = 0, 2\\
0 & \text{otherwise}.
\end{cases}$$
As $H^p(S^2; \mathbb{Z})$ is a free $\mathbb{Z}$-module for every $p$, we see that all the $\operatorname{Tor}$ terms vanish and therefore
$$H^n(S^2\times S^2; \mathbb{Z}) = \begin{cases}
\mathbb{Z} & n = 0, 4\\
\mathbb{Z}\oplus\mathbb{Z} & n = 2\\
0 & \text{otherwise}.
\end{cases}$$
As for the wedge sum, what you stated is not correct, it only holds for reduced cohomology. That is, $\widetilde{H}^n(X\vee Y; \mathbb{Z}) \cong \widetilde{H}^n(X;\mathbb{Z})\oplus\widetilde{H}^n(Y;\mathbb{Z})$. So your calculation of the cohomology groups is correct, except in degree zero:
$$H^n(S^2\vee S^2\vee S^4; \mathbb{Z}) \cong \begin{cases}
\mathbb{Z} & n = 0, 4\\
\mathbb{Z}\oplus\mathbb{Z} & n = 2\\
0 & \text{otherwise}.
\end{cases}$$
As $H^n(S^2\times S^2; \mathbb{Z}) \cong H^n(S^2\vee S^2\vee S^4; \mathbb{Z})$ for every $n$, your argument for showing that $S^2\times S^2$ and $S^2\vee S^2\vee S^4$ are not homotopy equivalent doesn't work.
So far we've only considered the cohomology groups of the two spaces, but one can also consider their cohomology rings.
Let $X$ be a topological space. For any principal ideal domain $R$, cup product endows $H^*(X; R) := \bigoplus_{n\geq 0}H^n(X; R)$ with the structure of a graded ring. If $f : X \to Y$ is a continuous map, then $f^* : H^*(Y; R) \to H^*(X; R)$ is a ring homomorphism, in particular, if $f = \operatorname{id}_X$, then $f^* = \operatorname{id}$. It follows that if $X$ and $Y$ are homotopy equivalent, then $X$ and $Y$ have isomorphic cohomology rings, not just cohomology groups.
If $\alpha, \beta$ denote the two generators of $H^2(S^2\times S^2; \mathbb{Z}) \cong \mathbb{Z}\oplus\mathbb{Z}$, then $\alpha\cup\beta \neq 0$. On the other hand, if $\gamma, \delta$ denote the two generators of $H^2(S^2\vee S^2\vee S^4; \mathbb{Z}) \cong \mathbb{Z}\oplus\mathbb{Z}$, then $\gamma\cup\delta = 0$. Therefore $S^2\times S^2$ and $S^2\vee S^2\vee S^4$ do not have isomorphic cohomology rings, so they are not homotopy equivalent.
Best Answer
As a statement about unreduced cohomology, this is incorrect (for $\bullet = 0$). The correct statement for unreduced cohomology is that
$$H^{\bullet}(X \sqcup Y) \cong H^{\bullet}(X) \times H^{\bullet}(Y)$$
where $\sqcup$ denotes the disjoint union, not the wedge sum. I write the product $\times$ on the RHS instead of the direct sum because
As a statement about reduced cohomology, this is fine on the level of abelian groups (and it can be proven using Mayer-Vietoris), but when taking into account the cup product you run into the annoying issue that reduced cohomology doesn't have a multiplicative identity.
One fix is to regard the cohomology of a pointed topological space $(X, \text{pt})$ as a pair consisting of a ring $H^{\bullet}(X)$ and an augmentation $H^{\bullet}(X) \to H^{\bullet}(\text{pt})$ (so reduced cohomology is the kernel of this map, also known as the augmentation ideal), and then the statement is that cohomology takes the pushout $X \vee Y$ to the corresponding pullback of the diagram $H^{\bullet}(X) \to H^{\bullet}(\text{pt}) \leftarrow H^{\bullet}(Y)$ (as an augmented ring, so keeping the induced map to $H^{\bullet}(\text{pt})$).