I'm interpreting the question differently: Namely, when can I use precisely what you did to define a metric?
The issue is that you can't always make a well defined identification of the tangent space at one point with the tangent space at another. So, saying $v\in T_p M$ "corresponds" to $v'\in T_q M$ doesn't always make sense.
For example, on $S^2$, given a nonzero tangent vector at the north pole, it should be clear that if this "corresponds" to anything, it should "correspond" to something nonzero. Then, a "correspondance" to every point on $S^2$ is nothing but a vector field on $S^2$ which vanishes nowhere. Unfortunately, the Hairy Ball Theorem states that there is no such vector field.
The class of manifolds you are looking for are the so called Parallelizable Manifolds. These are precisely those manifolds for which the tangent bundle admits a global trivialization. After choosing such a trivialization, choosing any basis for the tangent space at some particular point. Then, via the trivialaztion, this defines a basis at each point of your manifold and this gives you a way of identifying tangent spaces at different points.
I want to stress that this is very noncanonical - you must choose a trivialization and a basis. Different choices will give rise to different Riemannian metrics with different properties.
Parallizable manifolds include $\mathbb{R}^n$ and all Lie groups, as you guessed, but also contain many more manifolds. For example, $S^7$ is not a Lie group, but is parallelizable. Further, the product of any sphere with an odd dimensional sphere is parallelizable.
\langleand\ranglefor angle brackets.<and>are relation symbols; they are not only different, the spacing is different too. – Harald Hanche-Olsen Feb 11 at 8:02