Let $(M,g)$ be a compact Riemannian manifold, no boundary. I would like to know when is it possible to endow the tangent bundle $TM$ with an euclidean Riemannian metric. Do you know of a good reference?

I'll answer the particular question that Cecilia ultimately asked, after she elaborated her question in response to our comments. I believe that she was asking this: Given a Riemannian $n$manifold $(M^n,g)$, when does there exist a metric $\hat g$ on $TM$ such that each point in $M$ lies in some coordinate chart $x:U\to\mathbb{R}^n$ such that, in the associated tangential coordinate chart $(x,v):TU\to\mathbb{R}^n\times\mathbb{R}^n$, one has $$ \hat g = \pi^\ast g + {}^tdv\circ dv, $$ where $\pi:TM\to M$ is the basepoint projection. Let's say that such a coordinate chart $(U,x)$ is adapted to $\hat g$. The key to answering this question is to consider what happens on overlaps. If $(U,x)$ and $(V,y)$ are two adapated coordinate charts, then one has $y = F(x)$ for some $F:x(U\cap V)\to y(U\cap V)$, and the associated tangential coordinates are related by $(y,w) = \bigl(F(x),F'(x)v\bigr)$. Then the requirement that, on $TU\cap TV$, one have $$ \pi^\ast g + {}^tdv\circ dv = \hat g = \pi^\ast g + {}^tdw\circ dw $$ implies that ${}^tdw\circ dw = {}^tdv\circ dv$, which implies that ${}^t(F')\ F' \equiv I_n$. Thus, $F'$ takes values in $\mathrm{O}(n)$, and this implies that $F'$ be locally constant. Conversely if $F'$ is locally constant on $x(U\cap V)$ and takes values in $\mathrm{O}(n)$, then one has ${}^tdw\circ dw = {}^tdv\circ dv$ on $TU\cap TV$. In particular, the atlas of $\hat g$adapted coordinates $(U,x)$ consists of charts whose transition functions are locally Euclidean isometries, and it follows that $M$ must admit the structure of a flat Riemannian manifold (even though $g$ itself need not be flat). Conversely, if $M$ admits the structure of a flat Riemannian manifold, say $h$ is a flat Riemannian metric on $M$, then, letting $\hat h$ be the natural induced flat metric on $TM$, one can set $\hat g = \pi^\ast(g{}h) + \hat h$, and this will construct a $\hat g$ with the desired properties for which the atlas of $h$isometric coordinate charts is the atlas of $\hat g$adapted coordinates. 


There is the Sasaki metric on $TM$ which is one natural metric induced by $g$ on $M$. It is given by declaring the horizontal bundle and the vertical bundle orthogonal, and by pulling the the metric $g$ on both of them. It has the following property: for any geodesic $c$ on $M$ the velocity field $c'$ is a geodesic on $TM$ for the Sasaki metric. You can vary the construction of the Sasaki metric. If you have two metrics on $M$, consider the horizontal bundle with respect to the first metric, and pull one of the first or the second metric to the horizontal bundle and to the vertical bundle. This gives 4 metrics. You can even have a more general construction: Choose an affine connection on $TM$ (which need not come from a metric and it can have torsion, consider its horizontal bundle, and pull one metric to the horizontal bundle, another metric to the vertical bundle, and declare horizontal and vertical to be orthogonal. This seems to be most general method to get a metric on $TM$ in a functorial way from data on $M$. Consider a chart change $\phi=u\circ v^{1}$ for charts on $M$. Then $T(\phi)(x,v) = (\phi(x),d\phi(x)(v))$ and $$T^2(\phi)(x,v;y,w) = (\phi(x),d\phi(x)(v);d\phi(x)(y), d^2\phi(x)(v,y)+ d\phi(x)(w).$$ The last part in the second formula is how Christoffel symbols change. they naturally live in the 4th (=vertical) part of $T^2M$. This shows that in general, the question in your comment has to be answered negatively, because you need to specify a horizontal bundle, and this transforms in such a way, that in another chart you get nonzero $dx_i\otimes dv_j$parts. You cannot keep them apart invariantly under each chart change on $M$. 

