The explicit formula for cup product on group cohomology is as simple as can be. For simplicity let's consider integer coefficients H^*(G;Z), H*(G;Z), although this works for any coefficients as long as they're untwisted.
Let's define group cohomology using inhomogeneous cochains; thus we take the abelian groups C^n(G;Z) Cn(G;Z) := functions from G^n Gn to Z, endow them endowed with a differential d: C^n Cn -> C^n+1Cn+1, and then H^n(G;Z) Hn(G;Z) is the usual cohomology ker dn/im d_n/im d_n-1n-1.
Anyway, cup product is a map from H^k(G) Hk(G) tensor H^m(G) Hm(G) to H^k+m(G), Hk+m(G), and it comes from a map C^k(G) Ck(G) tensor C^m(G) Cm(G) to C^k+m(G). Ck+m(G). Namely, given two cochains f: G^n Gn -> Z and g: G^m Gm -> Z, define
f/\g: G^k+m Gk+m -> > Z
f/\g(x_1,...x_k+m f/\g(x1,...xk+m) = f(x_1,...x_k)g(x_k+1,...x_k+mf(x1,...xk)g(xk+1,...xk+m)
You can check by hand that the differential interacts with this operation by
d(f/\g) = df/\g + (-1)^k -1)k f/\dg
Thus this "wedge product" of cochains descends to a product on group cohomology, and this is exactly cup product. This is also how cup product is defined for de Rham cohomology; differential forms have a natural wedge product which satisfies d(f/\g) = df/\g + (-1)^k -1)k f/\dg, and so this induces the cup product on H^*(M;R).H*(M;R).
H^k(Y) Hk(Y) tensor H^m(Y) Hm(Y) -> H^k+m(Y > Hk+m(Y x Y) -> H^k+m(Y)> Hk+m(Y)
where the first map is the Kunneth map (just pullback by the two projections from Y x Y -> Y), and the second map is restriction to the diagonal. Taking Applying this perspective on to group cohomology, we would first define f x g : (GxG)^k+m GxG)k+m -> Z by
f x g ((x_1,y_1),...(x_k+m,y_k+m)) (x1,y1),...(xk+m,yk+m)) = f(x_1,...x_k)g(y_,...,y_k+m)f(x1,...xk)g(yk+1,...,yk+m).

