See
Brown, Edward, The cohomology of $B\text{SO}_n$ and $B\text{O}_n$ with integer coefficients. Proc. Amer. Math. Soc. 85 (1982), no. 2, 283–288.
for an answer to your questions. (As for applications: the paper is referenced in other papers and at least one of these uses it to obtain a result singularity theory.)
If I remember correctly, the computation is quite elaborate, even to to state.