The references given by Oscar Randal-Willams only cover $g\leq 2$. For $\mathcal{M}$$_3$ and $\mathcal{M}_{3,1}$, you can read LooijengaLooijenga, "Cohomology of $\mathcal{M}$$_3$ and $\mathcal{M}^1_3$".
For $\mathcal{M}$$_{2,4}$, $\mathcal{M}_{3,2}$ and $\mathcal{M}_4$ the Betti numbers can be found in Bergström-TommasiBergström–Tommasi, "The rational cohomology of $\overline{\mathcal{M}}_4$" (Math. Annalen versonMath. Annalen version, arXivarXiv version), sometimes summarizing their individual papers. For example, for $\mathcal{M}_4$, TommasiTommasi ("Rational cohomology of the moduli space of genus 4 curves") proved that $b_1=0$, $b_2=1$, $b_3=0$, $b_4=1$, $b_5=1$, and the rest are 0.
You haven't specified whether your marked points are individually labeled, or if they are allowed to be permuted. Fortunately Bergström-TommasiBergström–Tommasi compute the $S_n$--equivariant cohomology, so you can extract from that paper whichever answer you want.
One remark: The formula for the stable Betti numbers mentioned by Oscar Randal-Williams is for closed surfaces; the formula for marked points will be different. I think the stable cohomology for surfaces with marked points can probably be deduced either from Mumford's conjecture, or from one of the many proofs we now have. But I do not know where this has been written down.