Infinite products exist *only* for affine schemes? 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.
 A: I will try to argue that if an infinite product of quasi-compact schemes is representable by a scheme, then all but finitely many of them must be affine.
Edit:  I rewrote the argument a little to address the comments.  I hope the argument might finally be satisfying...
Lemma.  If $X_i$, $i \in I$ are quasi-compact schemes over a field $k$, then $\prod X_i$ has a closed point (i.e., there is a map from the spectrum of some field $K$ to $X$ that is representable by closed immersions) whose image in each of the $X_i$ is also closed.
Proof.  For each $i$, let $x_i$ be a closed point of $X_i$ (which exists because the $X_i$ are quasi-compact).  Let $K$ be a compositum of the residue fields of the $x_i$ (i.e., the residue field at a closed point of $Z = \prod_i x_i$, which exists because $Z$ is affine).  Let $X$ be the product of the $X_i$.  Then we get a map $\mathrm{Spec} \: K \rightarrow X$, which we have to show is a closed embedding.
It's enough to argue that the map $Z \rightarrow X$ is a closed embedding.  But if $Y$ is a scheme over $X$ then $Y_Z$ can be obtained as the intersection of closed subschemes $Y_{x_i} = Y \times_{X_i} x_i$, which is a closed subscheme.  $\Box$
Suppose that the product of schemes $X_i$, indexed by $i \in I$, is representable by a non-empty scheme $X$.  Assume that each $X_i$ is quasi-compact, so that for each $i$, we can find a Zariski cover $Y_i \rightarrow X_i$ of $X_i$ by an affine scheme $Y_i$.  Then we get a map $Y = \prod Y_i \rightarrow X$ and the source is an affine scheme.  Let $x$ be a closed point of $X$.  Let $U$ be an affine neighborhood of $x$ in $X$.  Let $y$ be a $K$-point of $Y$ above $x$, and let $V$ be a distinguished affine open neighborhood of $y$ in $Y$, contained in the pre-image of $U$, and defined by the invertibility of some $f \in \Gamma(Y, {\cal O}_Y)$.  Since $f$ can be expressed using functions defined on finitely many of the $Y_i$, the set $V$ must be the pre-image of a distinguished open affine $V' \subset \prod_{i \in I'} Y_i$ where $I'$ is a finite subset of $I$.  Let $I''$ be the complement of $I'$ in $I$ and let $X' = \prod_{i \in I'} X_i$ and define $X''$, $Y'$, $Y''$ analogously.  Then $V' \times Y''$ is an affine open neighborhood of $y$ in $Y$, contained in $V$.  If $U'$ denotes the image of $V'$ in $X'$ then $U' \times X''$ is an open neighborhood of $x$ in $X$, contained in $U$.  Let $x'$ be the projection of $x$ to $X'$, which we can safely assume is a closed point of $X'$, hence a closed point of $U'$, and let $K$ be the residue field of $x'$.  Therefore $\{ x' \} \times X''$ is a closed subscheme of $U$ and is therefore affine.  But $\{ x' \} \times X'' = K \otimes_k X''$ so by fpqc descent for affine schemes over $k$ (SGA1.VIII.2) it follows that $X''$ is affine.
Replacing $I$ with $I''$ we can now assume that $X$ is affine. Before proving that each $X_i$ is affine, I claim that each $X_i$ is separated.  We must show that for any scheme $Y$ and any two maps $Y \rightrightarrows X_i$, the locus in $Y$ where the maps agree is closed.  Let $x$ be a closed $K$-point of $\prod_{j \not= i} X_j$ for some extension $K$ of $k$.  Then we can extend the maps $Y \rightrightarrows X_i$ to maps $Y \otimes_k K \rightrightarrows X$.  Since $X$ is separated, the locus in $Y \otimes_k K$ where these maps agree is closed.  But this is the pullback via the map $Y \otimes_k K \rightarrow Y$ of the locus where the maps $Y \rightrightarrows X_i$ agree, so this latter subset of $Y$ must be closed by fpqc descent (see SGA1.VIII.4).
If $X$ is affine and non-empty then it is separated, so each $X_i$ is separated.  Therefore $Z := \prod_{j \not= i} X_j$ is separated for each $i$.  (Note that we don't yet know that $Z$ is representable by a scheme, but it still makes sense to claim that $Z$ is separated as a functor:  for any scheme $T$ and any two elements $a$ and $b$ of $Z(T)$, the locus in $T$ where $a$ and $b$ agree is closed.)  Let $z$ be a closed $K$-point of $Z$.  Then $X_i \otimes_k K = X \times_Z \{z\}$ is closed in $X$, hence is affine because we assumed $X$ to be affine.  This implies $X_i$ is affine by fpqc descent (see SGA1.VIII.2).
A: I believe (Edit: don't believe) that the following is true: 
If for each $i\in I$ the scheme $X_i$ is a filtered union of affine open subschemes (i.e. if the union of any two affine opens is contained in some affine open) then the product $\prod_{i\in I}X_i$ exists.
Proof: Take the direct limit, over all ways $V:i\mapsto V_i$ of choosing an affine open subscheme in each $X_i$, of the affine scheme $\prod_{i\in I}V_i$. The point is that this gives the right $Hom(Y, -)$ when $Y$ is affine (hence quasicompact) because any map $Y\to X_i$ must factor through some affine open $V\subset X_i$. 
Edit: This direct limit of schemes might not exist, as pointed out in the comments. In any case where it fails to exist, it appears to me that the product does not exist. Reason: There are compatible maps $\prod_{i\in I}V_i\to\prod_{i\in I}X_i$ inducing a natural map of sets from $colim_V(Hom(Y,\prod_{i\in I}V_i))$ to $Hom(Y,\prod_{i\in I}X_i)=\prod_{i\in I}Hom(Y,X_i)$ for a scheme $Y$. When $Y$ is affine, this is an isomorphism because $Hom(Y,X_i)$ is then the colimit of $Hom(Y,V)$ over affine $V\subset X_i$. I'm saying that if the product of these direct limits of affines exists, then the direct limit of products of affines must also exist and must coincide with it.
