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 in principle depends only on $H^\ast(M;\mathbb{Z}/2)$ as a module over the Steenrod algebra, together with the Stiefel-Whitney classes of $M$, but is usually not very pleasant (even for manifolds with nice cohomology such as $\mathbb{R}P^n$). 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.