When is a Riemannian metric equivalent to the flat metric on $\mathbb R^n$? I'm looking for an easily-checked, local condition on an $n$-dimensional Riemannian manifold to determine whether small neighborhoods are isometric to neighborhoods in $\mathbb R^n$.  For example, for $n=1$, all Riemannian manifolds are modeled on $\mathbb R$.  When $n=2$, I believe that it suffices for the scalar curvature to vanish everywhere (this is certainly necessary).  But my intuition is poor for higher-dimensional structures.
Put another way: given a Riemannian structure $g$ on a smooth manifold, when can I find coordinates $x^1,\dots,x^n$ so that $g_{ij}(x) = \delta_{ij}$?
 A: Greg's comment on Deane's answer is sort of correct (given suitable hypotheses), but maybe a bit misleading in the context of this discussion. Since the character count doesn't allow it, I'm adding this comment as an "answer" (though it is not an answer to the original question).
There are non-isometric 2-spheres $S_1,S_2$ for which there is a diffeomorphism $f$ from $S_1$ to $S_2$ so that the curvature at each point $p \in S_1$ is equal to the curvature of $f(p)$ in $S_2$. For example, let $O$ be a curve in the plane with dihedral $D_2$ symmetry whose curvature has 4 critical points (is this called an "oval"? I forget). If $S$ is a surface of revolution of $O$, then $S$ is foliated (in the complement of two "poles") by "latitude" circles of constant curvature, and the value of the curvature moves monotonically between two extreme values as one moves from the "poles" to the "equator". One can easily produce nonisometric surfaces with "the same" curvature function. The length of the circle with a given curvature value is an invariant of the isometry type which is not captured by the curvature itself (thought of as smooth function on $S$). 
I think this example (and more discussion) is in Berger's book "A panoramic view of Riemannian geometry".
A: Deane already answered the question.  I just want to add that knowing the existence of local flat coordinates (by the vanishing of the curvature) and actually finding the flat coordinates are two very different things.  I've had "fun" in the past finding explicit flat coordinates for flat metrics and it can be nontrivial, albeit highly satisfying when you work them out!
A: If the Riemannian metric is twice differentiable in some co-ordinate system, then this holds in any dimension if and only if the Riemann curvature tensor vanishes identically.
In dimension 2, it suffices for the scalar curvature to vanish.
In dimension 3, it suffices for the Ricci curvature to vanish.
In higher dimensions, you need to have the full Riemann curvature vanish.
A: This is just a rephrasing of Deane's answer, but let me add one general comment. To any Riemannian metric (or pseudo-Riemannian metric) $g$ on a manifold $M$, you can associate a Levi-Civita connection $\nabla : T_M \to T_M \otimes \Omega_M$, where $T_M$ is the cotangent sheaf and $\Omega_M$ is the cotangent sheaf. Just like how the de Rham $d : \mathcal{O}_M \to \Omega_M$ can be extended to $d : \Omega_M^i \to \Omega_M^{i+1}$, the connection $\nabla : T_M \to T_M \otimes \Omega_M$ can be extended to $\nabla : T_M \otimes \Omega_M^i \to T_m \otimes \Omega_M^{i+1}$. 
Then being able to find local coordinates $x_i$ such that $g_{ij} = \delta_{ij}$ is equivalent to $\nabla^2 = \nabla \circ \nabla : T_M \to T_M \otimes \Omega_M^2$, which corresponds to the Riemann curvature tensor that Deane mentions, being zero. This should be reminiscent of the $d^2 = 0$ of de Rham cohomology, or homological algebra in general... ;-)
It is perhaps not-so-standard (or not as standard as I would like) to talk about connections in terms of sheaves, but this point of view is better because it generalizes better. What I said above works in all of the "standard" geometric categories: $C^\infty$, real analytic, complex analytic, super-, etc. (Maybe it even works in the algebraic category? But I'm not sure, as the notion of local coordinates is more complicated in algebraic geometry.)
