As a statement about unreduced cohomology, this is incorrect (for $\bullet = 0$). The correct statement for unreduced cohomology is that
$$H^{\bullet}(X \sqcup Y) \cong H^{\bullet}(X) \times H^{\bullet}(Y)$$
where $\sqcup$ denotes the disjoint union, not the wedge sum. I write the product $\times$ on the RHS instead of the direct sum because
- While the two have the same underlying abelian group, the correct universal property of the RHS as a ring is that it is the product, and
- For an infinite disjoint union the answer continues to be the infinite product rather than the infinite direct sum (which lacks a multiplicative identity).
As a statement about reduced cohomology, this is fine on the level of abelian groups (and it can be proven using Mayer-Vietoris), but when taking into account the cup product you run into the annoying issue that reduced cohomology doesn't have a multiplicative identity.
One fix is to regard the cohomology of a pointed topological space $(X, \text{pt})$ as a pair consisting of a ring $H^{\bullet}(X)$ and an augmentation $H^{\bullet}(X) \to H^{\bullet}(\text{pt})$ (so reduced cohomology is the kernel of this map, also known as the augmentation ideal), and then the statement is that cohomology takes the pushout $X \vee Y$ to the corresponding pullback of the diagram $H^{\bullet}(X) \to H^{\bullet}(\text{pt}) \leftarrow H^{\bullet}(Y)$ (as an augmented ring, so keeping the induced map to $H^{\bullet}(\text{pt})$).
By Kunneth theorem $H^*(S^1 \times S^1) \cong H^*(S^1) \otimes H^*(S^1) \cong \mathbb{Z}[\alpha]/\alpha^2 \otimes \mathbb{Z}[\beta]/\beta^2$.
The tensor product is to be intended as tensor product of graded $\mathbb{Z}$-algebras.
Note that $\mathbb{Z}[\alpha]/\alpha^2 \cong \mathbb{Z} \cdot \{1, \alpha\}$ and $\mathbb{Z}[\beta]/\beta^2 \cong \mathbb{Z} \cdot \{1, \beta\}$ as graded $\mathbb{Z}$-modules (with gradings 0, 1), hence $\mathbb{Z}[\alpha]/\alpha^2 \otimes \mathbb{Z}[\beta]/\beta^2 \cong \mathbb{Z} \cdot \{1, \alpha \otimes 1, 1 \otimes \beta, \alpha \otimes \beta\}$ as graded $\mathbb{Z}$-modules (with gradings 0, 1, 1, 2).
At the same time it holds that $\mathbb{Z}[\alpha\, \beta]/(\alpha^2, \beta^2) \cong \mathbb{Z} \cdot \{1, \alpha, \beta, \alpha\beta\}$ as graded $\mathbb{Z}$-modules (with gradings 0, 1, 1, 2).
Hence they are isomorphic as graded $\mathbb{Z}$-modules, but the isomorphism is not a isomorphism of graded $\mathbb{Z}$-algebras.
In fact $(1 \otimes \beta)\cdot(\alpha\otimes 1) = (-1)^{|\beta||\alpha|} \alpha \otimes \beta = - \alpha \otimes \beta \neq \alpha \otimes \beta$ while $\beta \cdot \alpha = \beta\alpha = \alpha\beta$.
In general, there could not be an isomorphism of graded $\mathbb{Z}$-algebras between $\mathbb{Z}[\alpha]/\alpha^2 \otimes \mathbb{Z}[\beta]/\beta^2$ and $\mathbb{Z}[\alpha\, \beta]/(\alpha^2, \beta^2)$ because the first one is graded-commutative with terms of odd degrees, while the second one is commutative.
Best Answer
The right way to think of $H^*(X\vee Y)$ is not as a quotient of $H^*(X)\times H^*(Y)$ (which, as you point out, does not have a natural ring structure) but rather as a subring. Indeed, this is what the Mayer-Vietoris sequence actually gives you, since the natural map is $H^*(X\vee Y)\to H^*(X)\times H^*(Y)$, not the other way around.
Specifically, $H^*(X\vee Y)$ is the subring of $H^*(X)\times H^*(Y)$ which contains everything in positive degrees and in degree $0$ consists of the set of pairs $(f,g)\in H^0(X)\times H^0(Y)$ such that $f(x_0)=g(y_0)$, where $x_0$ and $y_0$ are the basepoints of $X$ and $Y$ (considered as $0$-cycles on $X$ and $Y$). Concretely, if $X$ has $m$ components and $Y$ has $n$ components so $H^0(X)\cong\mathbb{Z}^m$ and $H^0(Y)\cong\mathbb{Z}^n$, with the first coordinate in each corresponding to the component of the basepoint, then $H^0(X\vee Y)$ is the subring of $\mathbb{Z}^{m+n}$ consisting of all tuples whose first and $(m+1)$st coordinates are equal (which is isomorphic to $\mathbb{Z}^{m+n-1}$, by just removing one of those coordinates as redundant).
More conceptually, $H^*(X\vee Y)$ is the subring of $H^*(X)\times H^*(Y)$ consisting of all pairs $(a,b)$ such that $i^*(a)=j^*(b)$, where $i:\{*\}\to X$ and $j:\{*\}\to Y$ are the inclusions of the basepoints. Indeed, this is exactly the description given by the Mayer-Vietoris sequence. Since $H^*(\{*\})$ is trivial in positive degrees, this means $i^*(a)=j^*(b)$ is always true in positive degrees, and the only restriction is in degree $0$ as described above.