Why Cohomology Groups? Why do we need cohomology groups? Homology groups are easier to compute and given two topological spaces, there is an isomorphism in homology groups if and only if there is an isomorphism in cohomology groups. So why do I need them?
 A: Others have given the first reasons that arose historically, and that relate to a first course in algebraic topology.  But a further point comes up from a more advanced perspective: sheaf cohomology has a natural definition using injective resolutions, and these exist in any category of sheaves.  You can define sheaf homology by projective resolutions but these do not always exist.  See https://mathoverflow.net/questions/5378/when-are-there-enough-projective-sheaves-on-a-space-x 
So étale cohomology and other derived functor cohomologies are more natural than the corresponding homologies.
A: Cohomology appears naturaly. Lots of problems are solved locally and then the local solutions glued together to construct global solutions, and cohomology is the precise description of how to do that.
A: Fundamental reason why cohomology is more powerful is that singular cohomology has a natural ring structure over them. If $\varphi$ and $\psi$ are $R$-valued $m$ and $n$-cochains on a topological space $X$, then one can define an $(m+n)$ cochain $\varphi \smile \psi$ by 
$$(\varphi \smile \psi)([v_0, \cdots, v_{m+n}]) = \varphi([v_0, \cdots, v_m]) \psi([v_m, \cdots, v_{m+n}])$$
This pairing descends down to a pairing $H^n(X;R) \times H^m(X; R) \to H^{n+m}(X;R)$ on cohomology. Thus, $H^*(X;R) := \bigoplus_i H^i(X;R)$ automatically has a graded ring structure.
The intuitive reason is homology is about equivalence classes of chains on $X$, whereas cohomology is about equivalence classes of ring valued functions over chains in $X$. Functions can be multiplied (multiply the values pointwise) whereas simplices can't.
This ring structure is a powerful invariant. For example, $\Bbb{CP}^2$ and $S^2 \vee S^4$ have the same (co)homology groups in all dimensions. However, they are not homotopy equivalent as the integral cohomology rings differ: Cup square of generator of $H^2$ in $H^*(S^2 \vee S^4) \cong H^*(S^2) \oplus H^*(S^4)$ is zero, while cup square of generator of $H^2$ in $H^*(\Bbb{CP}^2)$ is nontrivial. 
(Note that this also proves that the Hopf map is not nullhomotopic, thus proving $\pi_3(S^2)$ is nontrivial. Indeed, a generalization of this idea is the Hopf invariant.)
A: Quote from Elements of Algebraic Topology by J. R. Munkres:

One answer is that cohomology appers naturally when one studies the problem of classifying, up to homotopy, maps of one space in other. Another is that cohomology is involved when one integrates differential forms on manifolds. Still another answer is [...] that the cohomology groups have an additional algebraic structure -- that of a ring -- and that this ring will distinguish between spaces when the groups themselves not.

