Infinite products don't exist in the category of schemes (see Jonathan Wise's answer here). However, all limits of affine schemes exist in the category of schemes (and are affine). I would like to know if affine schemes are the only ones which have this property, thus even sharpening the result. For example, we may ask the following:
Let $X$ be a scheme such that all powers $X^I$ exist in the category of schemes. Can we deduce that $X$ is affine?
I hope that the answer will be "yes". You may work in the category of $k$-schemes for a field $k$ and assume that $X$ is integral. You may also assume that all limits constructed from $X$ exist, for example all equalizers of morphisms $X^I \to X^J$, etc. Feel free to add other assumptions as well.
Jonathan has already made the following comment (which I cannot fill with details):
I believe the proof can be modified to show that if a product of a collection of quasi-compact schemes is a scheme then the product of some collection of all but finitely many of them is affine. Assuming they are flat over Z or something, I suspect this will be impossible unless all of those schemes are affine. Certainly an infinite product of projective lines is not affine.
Some time ago, I've already proven the following result (see here): Assume that $(X_i)$ is a family of $S$-schemes such that their fiber product $P$ exists in the category of schemes. If $Q$ denotes the fiber product of the $X_i$ in the category of locally ringed spaces (which exists and can be described explicitly), then the canonical morphism $P \to Q$ is bijective and the stalk maps are isomorphisms. But I don't know how to get the topology of $P$. This would be very helpful to show that $P$ does not exist.
But as a first step one would have to show that $Q$ is not a scheme, which is already hard in general. Here is an idea: Let $X \neq \emptyset$ be a $k$-scheme and assume that the LRS fiber product $Q=X^I$ ($I$ infinite set) is a scheme. Then the explicit construction implies that there are open subsets $U_i \subseteq X$, such that $U_i = X$ for almost all $i$, and that $\prod_i U_i$ is an affine scheme. Let $U$ be the (finite) product of the $U_i \neq X$. Then $U$ is a scheme, and $U \times X^I$ is an affine scheme. Under suitable finiteness conditions (?), a combination of Serre's criterion and the Künneth formula (see here) would imply that $X^I$ is an affine scheme. But then $X^I \cong X \times X^I$ shows with the same argument that $X$ is affine. But this all works only if $X$ and $X^I$ are quasicompact and quasiseparated.