For a proof of this result (and a more general version), there's a paper by Satoh  which has a lot of detail. The main idea is that for $TM$ to be Hermitian, the Nijenhuis tensor of $J^\prime$ needs to vanish. However, when you calculate the Nijenhuis tensor, you find that it vaishes if and only if the torsion and curvature of $D$ vanish (i.e. D is flat). See the equation on the bottom of page 8 of  for the exact formula.
For a Riemannian manifold, $g$ is flat iff the Levi-Civita connection is a flat connection, so I presume this is what the authors are using. For a more general connection $D$ (i.e. not the Levi-Civita connection), $(TM, J^\prime,g^D)$ is Kahler iff $(M,g,D)$ is a so-called Hessian manifold, which means that $D$ is flat and satisfies
$$(D_X g)(Y,Z)=(D_Y g)(X,Z)$$ for all vector fields $X,Y$ and $Z$. This relationship between the metric and connection is also known as Codazzi-coupling. The proof of this is also in that reference.
 Satoh, Hiroyasu, Almost Hermitian structures on tangent bundles, Suh, Young Jin (ed.) et al., Proceedings of the 11th international workshop on differential geometry, Taegu, Korea, November 9–11, 2006. Taegu: Kyungpook National University. 105-118 (2007). ZBL1125.53022.