We use large deviations to prove a general theorem on the asymptotic edge-weighted height Hn of a large class of random trees for which Hn c log n for some positive constant c. A graphical interpretation is also given for the limit constant c. This unifies what was already known for binary search trees (Devroye, 1986, 1988), random recursive trees (Devroye, 1987) and plane oriented trees (Pittel, 1994) for instance. New applications include the heights of some random lopsided trees (Kapoor and Reingold, 1989) and of the intersection of random trees. Keywords and phrases: Random binary search trees, random recursive trees, plane oriented trees, lopsided trees, probabilistic analysis, large deviations.