Following suggestion of Jacques, I’m reposting my comments above as an answer.

The ring $R[x]$ is formed by adding to $R$ a generic element $x$ commuting with $R$. If $R$ itself is commutative, this essentially amounts to taking the free algebra over one generator in the variety of commutative rings, except that we also have to ensure that the ring contains $R$, and this can be achieved by including in the axiomatization of the variety the positive (aka atomic) diagram of $R$ (as model theorists call it).

That is, we consider the signature $\sigma_0=\{+,\cdot\}\cup R$, where elements of $R$ serve as constants (nullary functions), and we take the variety $V_0$ axiomatized by the axioms of commutative rings (with $(-1)\cdot u$ playing the rôle of $-u$) and all axioms of the form $a+b=c$ or $a\cdot b=c$ that hold in $R$, where $a,b,c$ are constants from $R$. Then $R[x]$ is the free $V_0$-algebra over one generator.

Alternatively, $V_0$ is term-equivalent to the variety of unital associative commutative $R$-algebras: here we have unary functions $a(u)$ for $a\in R$, denoting scalar multiplication. The constant $a$ of $V_0$ is then definable as $a(1)$, and conversely, in $V_0$ we can define scalar multiplication by $a$ using the binary ring multiplication and the constant for $a$. As noted by Andrew Stacey above, commutativity of the algebras is not needed here: $R[x]$ is also the free unital associative $R$-algebra over one generator.

If we want $R[x]$ to be an initial algebra (= free algebra over the empty set of generators), and/or if $R$ is not commutative, we can include $x$ in the signature as a new constant: we take $\sigma_1=\sigma_0\cup\{x\}$, and $V_1$ is the variety axiomatized by the axioms of rings, the positive diagram of $R$ as in $V_0$ (i.e., the axioms of the form $a+b=c$ and $a\cdot b=c$), and the axiom $x\cdot u=u\cdot x$ (where $x$ is the nullary function from $\sigma_1$, whereas $u$ is a universally quantified variable). Then $R[x]$ is the initial algebra in $V_1$. (This is still true if we replace the last axiom with its instances $a\cdot x=x\cdot a$ for $a\in R$; this makes a larger but messier variety.)

If we want to endow $R[x]$ with composition, we can take the signature $\sigma_1\cup\{\circ\}$, and the variety axiomatized by the axioms of $V_1$ together with $(u\circ v)\circ w=u\circ(v\circ w)$, $(u+v)\circ w=(u\circ w)+(v\circ w)$, $(u\cdot v)\circ w=(u\circ w)\cdot(v\circ w)$, $a\circ u=a$ for $a\in R$, $x\circ u=u\circ x=u$. Then $R[x]$ is the initial algebra in this variety (and again, not all of these axioms are needed to obtain this property).

EDIT: Even if we fix the signature, there are may be many varieties whose initial algebra is $R[x]$. However, a canonical choice among them is the smallest such variety, i.e., the variety generated by $R[x]$, which is axiomatized by the set of all equations valid in $R[x]$. Now, I claim that if $R$ is commutative, then this minimal variety in signature $\sigma_1$ is axiomatized by the axioms of commutative rings and the positive diagram of $R$ as above. In other words, in the language using unary functions instead of constants, $R[x]$ generates the variety of commutative associative unital $R$-algebras.

This can be seen as follows. Using the axioms of commutative rings and the positive diagram of $R$, any equation $t=s$ in signature $\sigma_1$ in variables $u_1,\dots,u_n$ is equivalent to an equation of the form $f(u_1,\dots,u_n)=0$, where $f\in(R[x])[u_1,\dots,u_n]=R[x,u_1,\dots,u_n]$. It suffices to prove that if $f$ is not the zero polynomial, then this equation is not valid in $R[x]$, i.e., there exist $a_1,\dots,a_n\in R[x]$ such that $f(a_1,\dots,a_n)\ne0$. This can be shown by straightforward induction on $n$. The only interesting case is $n=1$, where we can take $a_1=x^d$ for any $d>\deg_x(f)$.

`$\{+,-,0,\cdot,1\}\cup R$`

whose axioms consist of the axioms of commutative rings plus the atomic diagram of $R$. Then $R[x]$ is the free $V$-algebra over one generator. This is a universal algebra characterization. However, you apparently mean category theory rather than universal algebra; I suppose you can characterize free algebras as initial in a suitable category (I’m not sure what to do about the generator). $\endgroup$11more comments