The statement $H^*(\bigvee_i T^2) = \bigoplus_i \bigwedge[\alpha_i, \beta_i]$ is actually wrong. The formula you are thinking of only works for reduced cohomology in a given dimension and unfortunately reduced cohomology doesn't work with cup products since the zeroth reduced group is zero. We actually have that $H^*(\bigvee_i T^2)$ is the quotient of the direct sum, identifying the various $\mathbb{Z} \cong \bigwedge^0 [\alpha_i , \beta_i]$ together. (So its kinda like a wedge sum of graded abelian groups whatever that means). I think this is easy enough to see by considering the map from the disjoint union to the wedge sum.
To compute the ring structure on $M_g$ we first compute the abelian groups $H^i(M_g)$ and then use $q^*$ to determine the ring structure.
The cohomology groups of $M_g$ are actually the same as the homology groups by universal coefficients. Indeed the homology groups of $M_g$ are free abelian groups $H^0(M_g)=\mathbb{Z}$, $H^1(M_g)=\mathbb{Z}^{2g}$, $H^2(M_g)=\mathbb{Z}$ so the Ext terms vanish and we get isomorphisms $H^k(M_g)= \text{Hom}(H_k(M_g), \mathbb{Z}) = H_k(M_g)$. All other cohomology groups in higher dimensions are zero of course.
Because the cup product are maps $H^k(M_g) \times H^l(M_g) \to H^{k+l}(M_g)$ and the cohomology is zero above dimension two it follows that the only nontrivial cup product will be $H^1(M_g) \times H^1(M_g)$. (We also have the trivial cup product $H^0(M_g) \times H^l(M_g) \to H^l(M_g)$. This is the usual multiplication by integers since $H^0(M_g) = \mathbb{Z}$ consists of constant integer valued functions on the points of $M_g$.)
We can use $q$ to determine the cup product here, but I'll only give a sketch. Specifically we can show that $H^1(M_g) = \mathbb{Z}^{2g}$ has generators $q^*(\alpha_i)$, $q^*(\beta_i)$, $i=1, \dots, g$ and that $H^2(M_g) = \mathbb{Z}$ is generated by $q^*(\alpha_1 \cup \beta_1) = \cdots =\pm q^*(\alpha_g \cup \beta_g)$. Then because $q^*$ is a ring homomorphism it follows that $q^*(\alpha_i)\cup q^*(\beta_i) =q^*(\alpha_i \cup \beta_i)$, $q^*(\alpha_i) \cup q^*(\alpha_i) = q^*(\alpha_i \cup \alpha_i)=0$, and likewise $q^*(\beta_i)\cup q^*(\beta_i)= 0$.
In conclusion, $H^*(M_g)$ is the quotient of $H^*(\bigvee_i T^2)$, identifying the top $\mathbb{Z}$ summand and this has a natural ring structure (but no good notation as far as I'm aware).