TITLE: Stiefel-Whitney class of an orthogonal representation
QUESTION [7 upvotes]: Let $BG$ denote the classifying space of a finite group $G$. For which group cohomology classes $c\in H^2(G;\mathbb{Z}/2)$ does there exist a real vector bundle $E$ over $BG$ such that $w_2(E)=c$?

REPLY [5 votes]: You can set this up as an obstruction theory problem. Your cohomology class is represented by a map $c: BG\to K(\mathbb{Z}/2,2)$, and the question is whether this map lifts through the universal Stiefel-Whitney class $w_2:BO\to K(\mathbb{Z}/2,2)$. 
The primary obstruction to such a lift turns out to be the class $$\beta Sq^2(c) = \beta(c\cup c)\in H^5(BG;\mathbb{Z}),$$ where $\beta$ is the Bockstein associated to the coefficient sequence $\mathbb{Z}\to \mathbb{Z}\to \mathbb{Z}/2$. This and several other relevant facts can be found in 
Teichner, Peter, 6-dimensional manifolds without totally algebraic homology, Proc. Am. Math. Soc. 123, No.9, 2909-2914 (1995). ZBL0858.57033.
As Neil Strickland mentions, there are higher obstructions which can possibly be defined in terms of secondary cohomology operations, provided you know enough about the Postnikov tower of $BO$.