Every particle transforms under spatial rotations according to a projective representation of the rotation group $SO(3)$. Cocycles appear in the definition of a projective representation.
Because state vectors differing only by a phase are the same for certain purposes, it turns out that symmetries need not correspond to unitary representations; they can correspond to projective representations, in which the rules of a representation hold only 'up to phases':
$$ \rho(1) = e^{i\theta}, $$ $$ \rho(g)\rho(h)= e^{i\theta(g,h)} \rho(gh) .$$
Here $\theta$ is a fixed real number, while the cocycle $e^{i\theta(g,h)}$ is any function of $g$ and $h$. […] Now for the same reason, one can change a projective representation $\rho$ to another $\rho'$ by throwing in an extra phase without changing the physics:
$$ \rho'(g)= e^{i\varphi(g)} \rho(g).$$ […] If nochoice of $\varphi$ makes $\theta'(g,h)=0$ for all $g,h$, we say the cocycle $e^{i\theta(g,h)}$ is essential. What this means is that it is impossible to 'straighten out' the projective representation $\rho$ into an actual representation.
page 179 in Gauge fields, knots, and gravity by John Baez