It is known that group cohomology class $H^d[U(1),Z]$ is Z for even d and 0 for odd d.
Do we know $H^d[G,Z]$ for $G=SO(3)$, $SU(2)$ and other compact Lie group?


Also is the Borel-group-cohomology class $H^d[G,R]$ alway trivial for compact Lie group $G$?



Group cohomology of compact Lie group with integer coeffient 
For the group $SU(2)=S^3$ we just have $H^\*(BSU(2);\mathbb{Z})=\mathbb{Z}[c\_2]$ (where $c\_2\in H^4$). More generally, for all $n$ we have
\begin{align\*}
 H^\*(BU(n);\mathbb{Z}) &= \mathbb{Z}[c\_1,\dotsc,c\_n] \\\\
 H^\*(BSU(n);\mathbb{Z}) &= \mathbb{Z}[c\_2,\dotsc,c\_n] \\\\
 H^\*(BSp(n);\mathbb{Z}) &= \mathbb{Z}[p\_1,\dotsc,p\_n]
\end{align\*}
with $c\_i\in H^{2i}$ and $p\_i\in H^{4i}$. 


Now let $V$ be the tautological $3$-plane bundle over the space $X=BSO(3)$. This has Stiefel-Whitney classes $w\_2\in H^2(X;\mathbb{Z}/2)$ and $w\_3\in H^3(X;\mathbb{Z}/2)$. There is also a Bockstein element $v=\beta(w\_2)\in H^3(X;\mathbb{Z})$ (which satisfies $2v=0$) and a Chern class $c=c\_2(\mathbb{C}\otimes V)\in H^4(X;\mathbb{Z})$. The mod two reduction map $\rho$ satisfies $\rho(v)=Sq^1(w\_2)=w\_3$ and $\rho(c)=w\_2^2$. If I've got everything straight, one can check using the Bockstein spectral sequence that
$$ H^\*(BSO(3);\mathbb{Z}) = \mathbb{Z}[v,c]/(2v). $$


It is not possible to be similarly explicit about $H^\*(BSO(n);\mathbb{Z})$ for general $n$ (although $H^\*(BSO(n);\mathbb{Z}/2)$ and $H^\*(BSO(n);\mathbb{Q})$ are fairly straightforward).


