For any commutative ring $B$ and subring $A$, the following are equivalent:
(1) $A$ is integrally closed in $B$
(2) If $F\in A[X]$ factorizes as $F = GH$ in $B[X]$ with $G$ and $H$ monic, then $G$ and $H$ are in $A[X]$.
These conditions imply:
(3) If $F\in A[X]$ is monic and irreducible, then $F$ remains irreducible in $B[X]$.
When $B$ is an integral domain, all three conditions are equivalent.
Proof: (2) $\Rightarrow$ (1) is trivial: if $F(b)=0$ for some $b\in B$ and $F\in A[X]$ monic, then $F = (X-b)G$ in $B[X]$ for some polynomial $G$ (remainder theorem). Then $G$ is monic, so by (2) $X-b$ and $G$ are in $A[X]$. In particular, $b$ is in $A$.
(1) $\Rightarrow$ (2) is folklore. Take a commutative ring $S$ that contains $B$, over which $G$ and $H$ can be written as products of linear factors: $G = (X-x_1)\cdots(X-x_n)$, $H = (X-y_1)\cdots(X-y_m)$. Then in $S$ the $x_i$ and $y_j$ are zeroes of the monic polynomial $F$, so they are integral over $A$. But the coefficients of $G$ and $H$ are (elementary symmetric) polynomials in the $x_i$ and $y_j$, respectively, hence they are again integral over $A$. As these coefficients are in $B$, by (1) they must lie in $A$. (Basically, one can construct such a ring $S$ in the same way as a splitting field for a polynomial over a field is found: first consider $S_1:= B[X]/(G)$; then $G = (X-x_1)G_1$ in $S_1[X]$, where we write $x_1 := X \bmod (G)$ in $S_1$. Then "adjoin another root $x_2$ of $G$" by passing to $S_2 := S_1[X]/(G_1)$, etc, until we arrive at a ring $S_n$ over which $G$ completely splits into linear factors. Then proceed to adjoin roots for $H$ in the same manner. Note that $B$ remains a subring throughout, i.e. no non-zero element of $B$ will map to $0$ in $S$.)
Condition (3) immediately follows from (2), for if $F = GH$ in $B[X]$, the leading coefficients of $G$ and $H$ are inverse units of $B$ because $F$ is monic. So we can rewrite this as $F = G_1H_1$ with $G_1$ and $H_1$ monic in $B[X]$.
When $A$ and $B$ are domains, (3) implies (1): if $F(b) = 0$ with $b\in B$ and $F\in A[X]$ monic, factor $F$ as $F_1\cdots F_r$ with the $F_i$ monic and irreducible in $A[X]$. (Factoring $F$ as a product of monic polynomials reduces the degree, so eventually we wind up with factors that are irreducible.) Since $B$ is a domain, it follows that $F_i(b) = 0$ for some $i$. By (3), $F_i$ is still irreducible in $B[X]$. But it is divisible by $X-b$ there, and so $F_i = X-b$. Hence $X-b$ is in $A[X]$ and thus $b$ belongs to $A$.
Q.e.d.
(Matthe van der Lee, Amsterdam.)