If $G=U(n)$ then I know a fair amount. Letting $n$ tend to infinity, Hom$(\pi_1 M^g, U)$ is homotopy equivalent to $U^{2g} \times BU$, so stably one can write down the cohomology using standard facts about the infinite unitary group. There is also a stability range for the inclusions Hom$(\pi_1 M^g, U(n))\to$ Hom$(\pi_1 M^g, U(n+1))$ (they are $(2n-2)$-connected maps). Roughly this range is the stability range for the unitary groups minus 2, if I remember correctly.
The way to prove these things is to follow Atiyah-Bott and think about the representation space as the space of flat connections modulo the based gauge group. If this is the sort of information you're looking for, and you'd like to know more details, I can say more. I think I wrote some notes a few years ago that go through this carefully. But since you mentioned Atiyah-Bott already, you may be looking in a different direction.
If you puncture the surface, the fundamental group becomes free. Then you might be interested in Tyler Lawson's paper about simultaneous similarity of unitary matrices (Math. Proc. Camb. Phil. Soc. 2008 or http://arxiv.org/abs/0809.0466 ). Or you might be interested in keeping track of some additional structure related to the punctures, in which case some of Tom Baird's work may be of interest to you.