This was originally two questions, one asking about the center of a group ring and one asking about the center of a monoid ring. The answer for groups is quite simple but the answer for monoids is surprisingly subtle and I do not think anybody knows a good description of the center of a monoid algebra that involves purely monoid theoretic stuff. That is, I do not know of any equivalence relation on a monoid so that an element belongs to the center if and only if it is constant on equivalence classes.

Of course, there is a trivial answer to this. If $M$ is a monoid then $$a=\sum_{m\in M}a_mm$$ is in the center of $RM$ if and only if for each $m,n\in M$ one has $$\sum_{mx=n}a_x =\sum_{ym=n} a_y.$$ For a group, both sides have exactly one term $x=m^{-1}n$ and $y=nm^{-1}=mxm^{-1}$. This explains the Wikipedia claim for a group ring.

But for a noncancellative monoid (e.g., a finite monoid that is not a group), these sums can be quite complicated and this makes it quite difficult to give a nice criterion of the form $a$ is in the center if and only if the coefficients of $a$ are constant on equivalence classes for some nice equivalence relation.

For example, an inverse monoid is a monoid $M$ such that for all $m\in M$ there is a unique element $m^\ast\in M$ with $mm^\ast m=m$ and $m^\ast mm^\ast=m^\ast$. For example the rook monoid of an $n\times n$ $0/1$-matrices with at most one $1$ in any row or column (so no attacking rooks on a chessboard) is an inverse monoid with transpose as $\ast$ and every finite inverse monoid embeds as a transpose-closed submonoid of the rook monoid. It was known since the fifties that the algebra of a finite inverse monoid is isomorphic to a direct product of matrix algebras over group rings. So in a sense we know what the center looks like. But what does it look like in the monoid basis? The isomorphism was proved by induction and not explicit, so it didn’t say much.

In 1987 Rukolaine gave a basis for the center using some idempotents which he constructed as alternating sums of chains of idempotents in the lattice of idempotents of the monoid. About 14 years later I rediscovered Rukolaine’s result using the Möbius function of the lattice and Solomon’s description of primitive idempotents in the algebra of a lattice, but they are the same idempotents as Rukolaine. So we can write down an explicit basis for the center, but is sufficiently complicated that I don’t know a nice way to tell if an element expressed in the monoid basis is in the center by looking at the coefficients without applying Möbius inversion.

As another example of the subtleties, a left regular band is a monoid satisfying the identities $x^2=x$ and $xyx=xy$. These come up in combinatorics because the covectors associated to a hyperplane arrangement or an oriented matroid form a left regular band. Bidigare, Hanson, Rockmore, Diaconis, Brown, Chung, Graham and others used their representation theory to analyze random walks on combinatorial structures. The curious thing is if $S$ is the semigroup you obtain from your left regular band by removing the identity, then the semigroup algebra of $S$ has a right identity. It will have an identity iff this right identity is central. We showed that occurs if and only if the poset of principal right ideals of $S$ is connected. This allowed us to prove the algebra of an affine hyperplane arrangement has an identity. So whatever condition you have to describe centrality in a monoid algebra needs to be equivalent to this connectivity question for this particular idempotent.

In general I don’t know an easy way to construct central elements in a monoid algebra. I’d love to know how to identify the central idempotents in a monoid algebra.

A more tractable question might be to describe which elements of the algebra of a finite monoid become central after you factor out the radical of the monoid algebra (over a field).