When is a Riemannian metric equivalent to the flat metric on $\mathbb R^n$?
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.
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".
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!