First, as Liviu noted, you need to relax the concept of triangulation, you need to allow pseudo-triangulationspseudo-triangulations (take a simplicial complex and identify some faces via homeomorphisms). The question was analyzed in detail by Marc Troyanov, starting in
M. Troyanov, Les Surfaces"Les surfaces Euclidiennes a singularites coniquesconiques", Ens. Math. 32 (1986) 79–94.
You definitely need more conditions than you stated in the question (Gauss-Bonnet formula). Look eHere is the precise statement.g
Let $S$ be a compact Riemann surface with marked points $p_i$ and cone angles $\theta_i$. For each here, Theorem 1$i$ define $\beta_i= (2π)^{-1}\theta_i -1$. Clearly, for the precise statement$-1<\beta_i<\infty$. Then:
An extra bonus is that you can also prescribeThere exists a flat metric on $S$ with conical singularities at $p_i$ and cone angles $\theta_i$ (in the given conformal class of) provided that the punctured surface (the punctures are at the vertices of the triangulationnecessary) Gauss-Bonnet condition holds: $$ \chi(S) +\sum_i \beta_i = 0.$$
Note that Troyanov did not discuss promoting this metric to a (pseudo) triangulation, but that is easy once you have a flat metric with singularities. Similar
A similar result holds if you use hyperbolic metrics on each simplex. It is an outstanding open problem to do the same when triangles are equipped with spherical metrics (and some cone angles are greater than $2\pi$). The best result in this direction, so far, is due to Alex Eremenko, see here, who gave a solution in the case of metrics on $S^2$ with three singular points.
I am unaware of anybody using this theorem to recover Kazdan-Warner, this does not seem easy and I am not sure it would be very useful. I do know that people are interested in giving a combinatorial description of Pontryagin classes and (I think, it was first done by Jeff Cheeger) it could be done by using piecewise-flat metrics.