When is a direct product of projective modules projective?

Over a field $k$, an arbitrary product of copies of $k$ is a free module. In other words, every vector space has a basis. In particular, this means that arbitrary products of projective $k$-modules are projective.

Over the ring of integers, an arbitrary product of projective modules is not necessarily projective. In fact, a product of countably infinitely many copies of $\Z$ is not projective!

So while arbitrary direct sums of projective modules are projective, the same is not true of arbitrary products for some rings.

Besides fields, which other rings have the property that arbitrary direct products of their projective modules are projective?

Stephen Chase completely figured this out in 1960. He proved:

Theorem. Let $R$ be a ring. Arbitrary products of projective left $R$-modules are projective if and only if $R$ is left-perfect and any finitely-generated right ideal of $R$ is finitely related.

Left perfect means that $R$ satisfies the descending chain condition on principal right ideals. Yes, that's not a typo. This isn't the usual definition of left perfect but it is implied by a theorem of Hyman Bass. The usual definition doesn't have a weird left-right thing going on but it would take a bit of time to explain it.

There is much to be said about the 'perfect' property, but let's just content ourselves with the commutative case. In this case, Chase observed that the property in his theorem is equivalent to $R$ being Artinian, which by definition means that every descending chain of ideals in $R$ is eventually stable. Example: $\Z/n$. The content of the theorem isn't trivial here either: $\Z/n$ has modules that are not projective, such as $\Z/p$ as a $\Z/p^2$-module. (In this case, $\Z/p$ cannot be projective as a $\Z/p^2$ module, because otherwise it would be free as $\Z/p^2$ is local. But every finite free $\Z/p^2$-module has to have $p^{2n}$ elements for some natural number $n$.)