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?



Metric on tangent bundle
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.


