For a reference see "Hsiang: Cohomology theory of topological transformation groups"Hsiang's Cohomology theory of topological transformation groups (chapter III, §1). The results of the book that are relevant for your question can also be found in the following paper: Richard Gonzales, http://www.math.uwo.ca/~rgonzal3/qfy.pdfLocalization in equivariant cohomology and GKM theory (cf. Remark 9, Lemma 5).
The idea is roughly as follows: Let $G$ be a compact Lie group and $G_0$ be the connecting component of the identity element. Then $BG_0 \to BG$ is a covering and $$H^\ast(BG;\mathbb{R}) = H^*(BG_0;\mathbb{R})^{\Gamma}$$ where $\Gamma = G/G_0$ is a finite group. Let $T$ be a maximal torus of $G_0$. Then one shows that $$H^\ast(BG_0;\mathbb{R}) = H^\ast(BT;\mathbb{R})^W$$ where $W$ is the Weyl group of $G_0$. Thus $H^\ast(BG;\mathbb{R})$ can be identified with a subring of $H^\ast(BT;\mathbb{R})$ that is a polynomial ring with generators of degree two. So $H^{odd}(BG;\mathbb{R}) = 0$ follows.