The standard way to view the first and second group cohomologies is this:


### The Standard Story


Let $G$ be a group, and let $M$ be a commutative group with a $G$-action. Then the first cohomology has the following interpretation: $H^1(G,M)$ is bijective with sections (modulo conjugation by $M$) of the short exact sequence $$1\rightarrow M\rightarrow M\rtimes G\rightarrow G\rightarrow 1.$$
Furthermore, the group of $1$-cocycles, $Z^1(G,M)$ is bijective with the sections of this short exact sequence. (Not modulo anything.) In fact, this holds even if $M$ is non-abelian.


The second cohomology $H^2(G,M)$ is bijective with the set of isomorphism classes of group extensions
$$1\rightarrow M\rightarrow H\rightarrow G\rightarrow 1$$
for which there exists a (or equivalently for every) set theoretic section $s:G\rightarrow H$ such that $g\cdot m=s(g)m(s(g))^{-1}$. (Here $g\cdot m$ denotes the action of $g$ on $m$ coming from the $G$-module structure of $M$.)


### Liftings


In a paper I have been reading, they have given an entirely different interpretation to the first cohomology. Namely:


Let $A$ and $B$ be groups, and let $C$ be a normal abelian subgroup of $B$. Let $\bar \phi:A\rightarrow B/C$ be a homomorphism. Assume $\phi$ has a lift $\alpha:A\rightarrow B$. Then $Z^1(A,C)$ is bijective with the set of lifts of $\phi$ to homomorphisms from $A$ to $B$.


The bijection goes like this: $\theta\in Z^1(A,C)$ goes to $\alpha\theta$.


My question is: can one give an interpretation in terms of lifts to the second cohomology, or to the group of $2$-cocycles?


More precisely:


### Question


Let $A$ and $B$ be groups, and let $C$ be a normal abelian subgroup of $B$. Let $\bar \phi:A\rightarrow B/C$ be a homomorphism.


Is it true that there exists a lift of $\bar \phi$ to a homomorphism from $A$ to $B$ if and only if $H^2(A,C)$ is trivial? Or is there a $2$-cocycle one can define (how would one define it?) such that there exists a lift of $\bar \phi$ if and only if it is trivial in $H^2(A,C)$? Or perhaps the right group to look at is the group of $2$-cocycles $Z^2(A,C)$ rather than the cohomology group?


I don't know if such an interpretation exists, so this is just wishful thinking. Since this is the first time I've seen the interpretation of $Z^1(A,C)$ in terms of lifts, I was curious whether such an interpretation extends to the second cohomology.



Can group cohomology be interpreted as an obstruction to lifts?
In your setup, the extension
$$
C \to B \to B/C
$$
represents a cohomology class $u\in H^2(B/C;C)$. The homomorphism $\phi: A\to B/C$ admits a lift $\bar\phi : A\to B$ if and only if $\phi^\ast(u)\in H^2(A;C)$ is zero.


To see this, note that the induced map on second cohomology is given by pullback of extensions, so $\phi^\ast(u)$ is represented by the bottom row in the diagram
$$
\begin{array}{ccccc}
C & \to & B & \to & B/C \newline
\| & & \uparrow & & \uparrow \newline
C & \to & E & \to & A.
\end{array}
$$
Now splittings of the bottom row correspond to liftings of $\phi$.


This gives plenty of examples where $\phi$ lifts but $H^2(A;C)\neq 0$. In fact, you could take any non-split extension $C\to B\to B/C$ such that $H^2(B;C)\neq 0$ and let $\phi: B\to B/C$ be the quotient map.


