Can a quotient ring R/J ever be flat over R? If R is a ring and J⊂R is an ideal, can R/J ever be a flat R-module? For algebraic geometers, the question is "can a closed immersion ever be flat?"
The answer is yes: take J=0. For a less trivial example, take R=R1⊕R2 and J=R1, then R/J is flat over R. Geometrically, this is the inclusion of a connected component, which is kind of cheating. If I add the hypotheses that R has no idempotents (i.e. Spec(R) is connected) and J≠0, can R/J ever be flat over R?
I think the answer is no, but I don't know how to prove it. Here's a failed attempt. Consider the exact sequence 0→J→R→R/J→0. When you tensor with R/J, you get

0→ J/J2→R/J→R/J→0

where the map R/J→R/J is the identity map. If J≠J2, this sequence is not exact, contradicting flatness of R/J.
But sometimes it happens that J=J2, like the case of the maximal ideal of the ring k[tq| q∈Q>0]. I can show that the quotient is not flat in that case (see this answer), but I had to do something clever.
I usually think about commutative rings, but if you have a non-commutative example, I'd love to see it.
 A: Your "trivial" examples all resulted from direct sum decompositions of the ring R.  By asking for examples without idempotents, you are asking for rings that do not have direct sum decompositions.  In a noncommutative ring R, the corresponding would be a ring that has no central idempotents.  I can provide a noncommutative example that is "in-between," so that it has nontrivial idempotents, but no nontrivial central idempotents.
For an ideal J in a noncommutative (read: not-necessarily-commutative) ring R, there is a way to reformulate when the right R-module R/J is flat.  In T.Y. Lam's Lectures on Modules and Rings, Proposition 4.14 implies that R/J is right flat if and only if, for every left ideal RL ⊆ R, 
J ∩ L = JL.
(Notice that this provides an alternative way to verify that for such J, J2 = J.)
Now given a field k (or even a division ring!), let V be a (right) vector space of countably infinite dimension, and let R = Endk(V), acting on V from the left.  This ring has many idempotents, corresponding to direct sum decompositions of V.  One can show that R has precisely three ideals, namely 0, R, and the ideal J consisting of endomorphisms of finite rank (see Exercises 3.15-3.16 of Lam's Exercises in Classical Ring Theory).  In particular, R does not decompose as the direct sum of two nontrivial subrings.  Let f be any finite-rank element of R, and let p in R be a projection of V onto the image of f.  Certainly f = pf ∈ Jf.  This makes it easy to show that J satisfies J ∩ L = JL for every left ideal L of R, and it follows that R/J is flat.
A: *

*If $A$ is arbitrary and $I$ is an ideal of finite type such that $A/I$ is a flat $A$-module, then $V(I)$ is open and closed. In fact, $A/I$ is a finitely presented $A$-algebra and thus $\operatorname{Spec}(A/I) \to \operatorname{Spec}(A)$ is a flat monomorphism of finite presentation, hence an étale monomorphism, i.e., an open immersion (cf. EGA IV 17.9.1).


*If $A$ is a noetherian ring then $A/I$ is flat if and only if $V(I)$ is open and closed (every ideal is of finite type).


*If $A$ is not noetherian but has a finite number of minimal prime ideals (i.e., the spectrum has a finite number of irreducible components), then it still holds that $A/I$ is flat iff $\operatorname{Spec}(A/I) \to \operatorname{Spec}(A)$ is open and closed. Indeed, there is a result due to Lazard [Laz, Cor. 5.9] which states that the flatness of $A/I$ implies that $I$ is of finite type in this case.


*If $A$ has an infinite number of minimal prime ideals, then it can happen that a flat closed immersion is not open. For example, let $A$ be an absolutely flat ring with an infinite number of points (e.g. let $A$ be the product of an infinite number of fields). Then $A$ is zero-dimensional and every local ring is a field. However, there are non-open points (otherwise $\operatorname{Spec}(A)$ would be discrete and hence not quasi-compact). The inclusion of any such non-open point is a closed non-open immersion which is flat.
The example in 4) is totally disconnected, but there is also a connected example:


*There exists a connected affine scheme $\operatorname{Spec}(A)$, with an infinite number of irreducible components, and an ideal $I$ such that $A/I$ is flat but $V(I)$ is not open. This follows from [Laz, 7.2 and 5.4].

[Laz] Disconnexités des spectres d'anneaux et des préschémas (Bull SMF 95, 1967)
Edit: Corrected proof of 1). An open closed immersion is not necessarily an open immersion! (e.g. $X_{red} \to X$ is a closed immersion which is open but not an open immersion.)
Edit: Raynaud-Gruson only shows that flat+finite type => finite presentation when the spectrum has a finite number of associated points. Lazard proves that it is enough that the spectrum has a finite number of irreducible components. Added example 5).
A: Just a small point.  There are rings over which every module is flat.  These are the absolutely flat rings in the checked answer above, but they are also called von Neumann regular rings.  An infinite product of fields is the standard example of a commutative von Neumann regular ring that is not semisimple.  But there are lots and lots of noncommutative von Neumann regular rings.   Note that a Noetherian von Neumann regular ring is semisimple, but every von Neumann regular ring is coherent.   
A: I believe that one can use an Eilenberg swindle-type argument. Let N denote the positive integers. Let A=Z[N] denote the Z-polynomial ring on N. Create a surjective morphism A->A by sending x_1 to zero and for i>1 sending x_i to x_{i-1}. Then A itself is a proper quotient of A. But, clearly A is flat as an A-module.
There is a similar construction (I think) to create a noetherian but infinitely generated ring where this would work as well.
A: Here is a better (read: correct) answer than what I tried above.
There is a ring we all known and love: the ring of dual numbers, k[e]/(e^2). I claim that k=(k[e]/(e^2))/(e) is a projective k[e]/(e^2)-module. In fact, this follows quite easily from the fact that the quotient morphism is split. Indeed, the unit morphism k->k[e]/(e^2) splits the surjection k[e]/(e^2)->k. Therefore, k is a split direct summand of a free module, and hence it is projective. Since projective modules are flat, this shows that k is flat over the dual numbers.
A similar argument shows apparently shows that any k-algebra A which is finitely generated and local over a algebraically closed field has k as a flat quotient ring. Indeed, if m is the maximal ideal, then A/m=k, and 0->m->A->A/m->0 is split.
I'm not sure if this the correct intuition, but one can think of the closed point of the ring of dual numbers as being a deformation retract of the whole space. And, for the local rings, they are tiny neighborhoods around their closed points.
