For $p=2$ there are references from which you can extract the $\mathbb{Z}/2$ cohomology algebra of $B(M,2)$ for any closed manifold $M$. The answer depends only on $H^\ast(M;\mathbb{Z}/2)$ as a module over the Steenrod algebra, but is usually not very pleasant (even when this module is). The method consists of showing that the map $$ B(M,2)\to S^\infty \times_{\mathbb{Z}/2} M\times M $$ is surjective in cohomology, and calculating its kernel. The situation is nicely summarised in Section 4 of Bausum, David R. *Embeddings and immersions of manifolds in Euclidean space.* Trans. Amer. Math. Soc. 213 (1975), 263–303, where you will find references to the original articles of Haefliger and Yo Ging-Tzung.