For which rings does a polynomial in $R$ have finitely many roots? Which infinite rings satisfy the following 
Every non-zero polynomial in $R[X]$ has only finitely many roots ?
Are there such rings which are not integral domains ?

This is an incomplete answer to your question but covers a fair bit of ground. I'm unaware of any theorem that classifies this exactly for all rings, but I make no claims about being an expert in ring theory! I hope another answer comes along with broader classification results!
So let's take care of the easy case first: If $R$ is an integral domain, then certainly each $p(x) \in R[x]$ of positive degree has finitely many roots. In fact, as you're undoubtedly aware, if $n = \deg p$ then $p(x)$ has at most $n$ roots in $R$. This can be proved by the usual inductive argument using the division algorithm.
Thus this works for rings in which the division algorithm holds, right? Well, actually, no, not quite. The classical example is that over the quaternion ring $R=\mathbb{H}$ (which has left- and right-division algorithms) the polynomial $p(x) = x^2 + 1$ has infinitely many roots. As discussed in the answers to this question, the "usual inductive argument" I just skipped over for integral domains $R$ subtly relies on the fact that $R$ is commutative.
Hence moving to non-commutative rings poses problems. Likewise, if $R$ (is infinite and) has zero divisors, then nonzero polynomials with infinitely many roots always arise. Indeed, if $R$ is infinite and $a,b \in R \setminus\{0\}$ with $ab = 0$, then $br$ is a root of $f(x) = ax$ for all $r \in R$.
Hopefully this gives you some perspective on your question. If there are finer-toothed classifications of non-commutative rings in which all polynomials have finitely-many roots, I hope to see them here.
