In a principal ideal ring, is every nonzero prime ideal maximal?
Martin Brandenburg is right: for a commutative ring $A$, $A[t]$ is a principal ideal ring (henceforth a "principal ring") iff $A$ is a finite product of fields.
In the following, all rings will be commutative.
Step 0: We make use of the following easy facts:
$\bullet$ A finite product of principal rings is a principal ring.
$\bullet$ For any rings $A_1$ and $A_2$, we have $(A_1 \times A_2)[t] \cong A_1[t] \times A_2[t]$.
$\bullet$ For any ideal $I$ in a ring $R$, $R[t]/IR[t] \cong (R/I)[t]$.
Step 1: If $A[t]$ is principal, so is $A$. By a theorem of Hungerford, $A$ is isomorphic to a finite product of rings $\prod_{i=1}^r A_i$, each of which is either a PID or a quotient of a PID. Then $A[t] \cong \prod_{i=1}^r A_i[t]$. Each $A_i[t]$ has dimension one more than the dimension of $A_i$, so if there is a PID factor then $A[t]$ has dimension $2$, contradiction. So we are left with the case of a finite product of quotients of a PID. By a Chinese Remainder Theorem argument we can further decompose this into a finite product of quotients of DVRs, and thus we reduce to the following local case:
Let $A$ be a DVR with uniformizer $\pi$. If for some $n \in \mathbb{Z}^+$ the ring $B = A/\langle \pi^n \rangle[t] \cong A[t]/\langle \pi^n \rangle$ is principal, then $n = 1$.
Step 2: Let's assume $n > 1$. The evident thing to do here is try to show that the ideal (in $B$ naturally corresponding to) $I = \langle \pi ,t \rangle$ is not principal. This should be an elementary calculation. I decided to reduce myself to an easier calculation though: if $I$ were principal, then so would be its pushforward in the quotient ring $B' = A[t]/\langle \pi,t \rangle^2$, and this calculation is truly easy: suppose $I = \langle p \rangle$. Then there are $x,y \in B'$ with $px = \pi$, $py = t$. We can write
$p = p_0 + p_1 t$, $x = x_0 + x_1 t$, $y = y_0 + y_1 t$ with $p_i,x_i,y_i \in A$. If you multiply everything out and consider the "valuations" of $p_i$, $x_i$, $y_i$ -- here I use parentheses because I am working in a quotient with $\pi^2 = 0$, so one can think of every element as having valuation $0$, $1$ or $\geq 2$ -- then you see in a few lines that this is not possible.
$\newcommand{\mm}{\mathfrak{m}}$ Added: Here is an approach to Step 2 that avoids any computation. Consider the maximal ideal $\mm = \langle \pi, t \rangle$ in $\tilde{B} = A[t]$. It obviously has height at least $2$, so by the Generalized Principal Ideal Theorem (GPIT) it is not principal (and in fact has height exactly $2$). Consider its image in the localization $C = \tilde{B}_\mm$: the height has not changed so it still requires $2$ generators. By Nakayama's Lemma, the minimal number of generators of $\mm$ is equal to the minimal number of generators of $\mm/\mm^2$, so $\mm/\mm^2$ is indeed a nonprincipal ideal in $C/\mm^2 = B'$.
Comments: 1) Note that I ended up using a harder result than the one of Zariski-Samuel that a principal ring is a finite product of PIDs and Artinian principal rings. In particular, the result of Zarisk-Samuel is proved in my commutative algebra notes, but Hungerford's Theorem is only stated: the proof uses the Cohen structure theory of complete local rings, which I do not treat. I expect this will turn out to be overkill.
2) If you only wanted to answer the title question, there are easier ways to go. Martin Brandenburg's answer links to a webpage which gives a completely elementary proof that a principal ideal ring has dimension at most one. To my mind though the most natural proof of this is simply to apply Krull's Principal Ideal Theorem, which implies that a prime ideal of height $n$ in a Noetherian ring requires at least $n$ generators.
3) If in the construction above we take our DVR $A$ to be $\mathbb{Z}_p$, then the ring $B' = A[t]/\langle p,t \rangle^2$ is a nonprincipal ring of finite order $p^3$. This is minimal in the sense that a finite nonprincipal ring must have order divisible by the cube of some prime.
4) Note that a commutative ring is a finite product of fields iff it is a semisimple ring: every short exact sequence of $R$-modules splits. Is there a different proof which uses this fact?
If $A$ is a finite product of fields, then $A[x]$ is a principal ideal ring. I think the converse also holds.
A principal ideal ring has dimension $\leq 1$ (see here, this is elementary). If $A[x]$ is a principal ideal ring, then $1 \geq \dim(A[x]) \geq \dim(A)+1$, hence $\dim(A)=0$. Besides, $A$ is a principal ideal ring (as a quotient of $A[x]$), in particular noetherian. It is well-known that then $A$ is artinian, and that $A$ is a finite product of local artinian rings. Passing to one of the factors, we may assume that $A$ is local artinian ring and have to show that $A$ is a field.
[... to be continued later, I have to go now]
The missing piece of Martin Brandenburg's answer is the following:
Let $A$ be an artinian local ring such that $A[X]$ is a PIR. Then $A$ is a field.
Obviously $A$ is a PIR. Let $\mathfrak m=(a)$ be the maximal ideal of $A$. If $a=0$ we are done. Assume that $a\neq 0$. Since $A[X]$ is a PIR, the ideal $(a,X)$ of $A[X]$ is principal, that is, there exists $f\in A[X]$ such that $(a,X)=(f)$. Then $A[X]/(f)\simeq A/(a)$ is a field, so $f$ generates a maximal ideal. On the other side, $A[X]/(a)\simeq A[X]/\mathfrak m[X]\simeq (A/\mathfrak m)[X]$ is an integral domain, so $a$ generates a prime ideal in $A[X]$. Since $a\in(f)$ we get that $a=fv$, $v\in A[X]$. Then $fv\in (a)$ implies $f\in (a)$ or $v\in (a)$. If $f\in (a)$, then $f=ag$, $g\in A[X]$. Since $X\in (f)$ there exists $h\in A[X]$ such that $X=fh$. We get $X=agh$ and then, by identifying the coefficients, we obtain $1=ab$, for some $b\in A$, a contradiction. If $f\notin (a)$, then $v\in(a)$, that is, $v=av'$, and therefore $a=afv'$. It follows that $1-fv'$ is a zerodivisor of $A[X]$. But it's easy to show that $J(A[X])=aA[X]$ and $Z(A[X])=aA[X]$ (here $J(A[X])$ stands for the Jacobson radical of $A[X]$ and $Z(A[X])$ for the set of zerodivisors of $A[X]$). Thus $1-fv'\in J(A[X])$. In particular, $1-(1-fv')=fv'$ is an invertible element of $A[X]$, so $f$ is invertible, a contradiction.