rings in which every element is a sum of two commuting idempotents Is there a known characterization of the rings $R$ (containing $1$) with this property: every element of $R$ is a sum of two commuting idempotents.
 A: The trivial/elementary proof (in particular, it does not use the axiom choice).
A ring $R$ satisfies your condition iff it satisfies the identity $x^3=x$.
Pf.
Will shows above with a short computation that if $R$ satisfies the condition, then the characteristic divides $6$.  So if $z=e+f$ with $e,f$ commuting idempotents, then $z^3=(e+f)^3=e+6ef+f = e+f=z$.  
Suppose $z^3=z$ for all elements of $R$.  Now $R$ has characteristic dividing $6$ since $2=(1+1)^3=8$.  Thus we have $R$ is a product $R_1\times R_2$ of a ring $R_1$ of characteristic $2$ and $R_2$ of characteristic $3$.  The ring $R_1$ is boolean (using $z-1=(z-1)^3=z^3-3z^2+3z-1=z^2-1$, whence $z^2=z$) and so all elements are idempotent and we are done.  So it suffices to handle $R_2$, i.e., assume the characteristic is $3$.
Note $z^2$ is idempotent and $z=z^2+(z-z^2)$.  We claim the latter is idempotent.  Then $(z-z^2)^2= z^2-2z^3+z^4=2z^2-2z=z-z^2$.  Done.
Answer.
I believe that the answer is that the ring be a subdirect product of copies of $Z/2$ and $Z/3$, which in this case is equivalent to being in the variety of rings generated by $Z/6$.
My original revised answer below says that a ring satisfying the desired condition is a subdirect product of copies of $Z/2$ and $Z/3$ and hence in the variety generated by $Z/6$.  
Suppose $R$ is a ring in the variety generated by $Z/6$.  Since $R$ is a direct limit of  finitely generated rings and your property is closed under direct limit, we may assume that $R$ is finitely generated.  But then $R$ is finite because a variety generated by a finite ring is locally finite.
But if $R$ is finite and in this variety, then $R$ is a reduced finite commutative ring and hence a finite direct product of domains belonging to the variety generated by $Z/6$.  But $Z/2$ and $Z/3$ are the only domains in this variety.
Original Revised Answer.
A necessary condition is that $R$ is a subdirect product of copies of $Z/2$ and $Z/3$.  
Claim 1:  The class of rings satisfying your property is closed under direct product and homomorphic images.
Pf. Exercise.
Claim 2: If the ring is indecomposable (not a direct product), then the ring either is a boolean algebra or satisfies $z^3=z$. 
Pf. See Will's answer and the comments.
Claim 3: the ring $R$ is reduced (i.e., has no non-zero nilpotents).
Pf. Clear since it is a product of a ring satisfying $z^2=z$ and one satisfying $z^3=z$.
Theorem 12.7 in Lam's book on non-commutative rings shows a subdirectly irreducible reduced ring is an integral domain.  Since 0,1 are the unique idempotents of an integral domain, we conclude that $R$ is subdirect product of $Z/2$ or $Z/3$.
Now boolean algebras (=subdirect products of $Z/2$) all have the desired property so it remains to see which subdirect products of $Z/3$ have the property.
A: If $x$ and $y$ are two commuting idempotents, then $(x+y)^3 = x+y+6xy$, $(x+y)^2=x+y+2xy$, so $z=x+y$ satisfies the equation $z^3-3z^2+2z=0$. Plugging $z=3$ into the equation, we obtain $6=0$. So the ring is a product of a ring of characteristic $3$ and a ring of characteristic $2$.
In the ring of characteristic $2$, $(x+y)^2=(x+y)$, so every element is idempotent. This implies that the ring is commutative, because
$$0 = (a+b)-a-b=(a+b)^2-a^2-b^2 = ab+ba = ab-ba$$
So the ring is a Boolean algebra - the ring of locally constant functions to $\mathbb F_2$ on a compact, totally disconnected topological space.
In the ring of characteristic $3$, as Clement points out the ring is commutative, because we have $a^3=a$, so if $a$ is invertible then $a^2=1$, so in the group of units every element has order $2$, so the group of units is commutative. But every element is the sum of two units: $a= (1-a-a^2) + (a^2-a-1)$, so the whole ring is commutative.
Being reduced, the intersection of all the prime ideals is $0$, but the field of fractions of a prime ideal is a field where every element is its own cube, hence is $\mathbb F_3$. So the ring embeds into a product of copies of $\mathbb F_3$. By the same logic as in the Boolean algebras case that the ring is the ring of locally constant  functions to $\mathbb F_3$ on a compact totally disconnected topological space:
Let $R$ be our ring, then $\operatorname{Spec} R$ is a topological space by standard ring theory. Since each prime ideal has quotien $\mathbb F_3$, and element $x\in R$ corresponds to a function from this space to $\mathbb F_3$. Since the sets $(x=0)$, $(x=1)$, $(x=2)$ are each closed, because they correspond to ideals, the function must be locally constant. Conversely, a locally constant function actually corresponds to an element of the ring since it locally looks like an element of the ring. The space is totally disconnected since each pair of distinct points must be distinguished by some locally constant function.
So the final answer is that such a ring consists of all the locally constant functions to $\mathbb F_2$ and $\mathbb F_3$, respectively, on a pair of compact, totally disconnected topological spaces. Conversely, any such ring will have every element the sum of two idempotents.
EDIT: In a ring where every element is the sum of $n$ commuting idempotents, every element will satisfy $\prod_{i=0}^{n} (z-i)=0$, so by plugging in $n+1$, we will have $n!=0$. So the ring will decompose as a product of $p$-power parts for $p\leq n$ prime. Mod $p^k$, each element which is the sum of $n$ idempotents satisfies $\prod_{i=0}^{\min(n, p^k-1)} (z-i)=0$. In particular, mod $p$ we will have $z^p-z=0$. So mod $2$ and mod $3$ the ring will still have the same form, but I think at some point (mod $4$? mod $5$? mod $7$?) it stops being necessarily commutative.
In the finite case, and the commutative case, things get simpler.
