  Let $C_{k_1}, \ldots, C_{k_n}$ be cycles with $k_i\geq 2$ vertices ($1\le
i\le n$). By attaching these $n$ cycles together in a linear order, we obtain a
graph called a polygon chain. By attaching these $n$ cycles together in a
cyclic order, we obtain a graph, which is called a polygon ring if it can be
embedded on the plane; and called a twisted polygon ring if it can be embedded
on the M\"{o}bius band. It is known that the sandpile group of a polygon chain
is always cyclic. Furthermore, there exist edge generators. In this paper, we
not only show that the sandpile group of any (twisted) polygon ring can be
generated by at most three edges, but also give an explicit relation matrix
among these edges. So we obtain a uniform method to compute the sandpile group
of arbitrary (twisted) polygon rings, as well as the number of spanning trees
of (twisted) polygon rings. As an application, we compute the sandpile groups
of several infinite families of polygon rings, including some that have been
done before by ad hoc methods, such as, generalized wheel graphs, ladders and
M\"{o}bius ladders.
