Let $G$ be a group and $A$ a group with a $G$-action. Then in general, $H^0(G;A)=A^G$ is a group, and $H^1(G;A)$ is simply a pointed set. If $A$ is an abelian group, then $H^i(G;A)$ exists and is an abelian group for all $i \ge 0$.
This resembles the fact that if $X$ is a pointed space, then $\pi_1(X)$ is always a group, while $\pi_0(X)$ is just a pointed set. But if $X$ has an abelian group structure (more generally, a double loop space structure), then all $\pi_i(X)$ are abelian groups.
We can extend the analogy further to the non-pointed situation if we consider as given not a group $A$ with an action of $G$, but an extension $0 \to A \to E \to G \to G$. Then there is $H^2(G;A)$, which is simply a truth value, depending on whether the sequence splits or not. This is analogous to the fact that for a non-pointed space $X$, $\pi_{-1}(X)$ is a truth value, depending on whether $X$ is empty or not.
The relation can be made more explicit if we let $X$ be the space (groupoid) of sections of $E \to G$. Then $H^i(G;A)$ is naturally $\pi_{1-i}(X)$, at least for $0 \le i \le 2$.
Is there a generalization to all natural numbers $i$ in the case that $A$ is abelian? This would seem to require producing a non-connective spectrum of sections, but I'm not sure how to do this. My best attempt is to deloop and think about $0 \to BA \to BE \to BG \to 0$. However, how do I deal with an infinite delooping of $BA$ in this sequence when $BG$ is not a loop space (because $G$ might be nonabelian)?
Also, is there a group cohomology analogue of the case where $X$ is a single loop space? I.e., where $H^0(G;A)$ is an abelian group, $H^1(G;A)$ is a group, $H^2(G;A)$ is a pointed set, and $H^3(G;A)$ (if you set things up correctly) is a truth value?