It fails in general that all maximal ideals in a commutative ring with unity have the same height. It's easy to construct a counter-example when the ring is NOT an integral domain (consider the coordinate ring of a line union a surface). The intuition is that the dimensions at different points are different.
It is indeed true that all maximal ideals have the same height when the ring $A$ is a finitely generated algebra over some field $k$ and does not have any nonzero zero-divisors. This height equals the transcendence degree of $A$ over $k$. However, in general, even when the ring is a Noetherian integral domain, the statement may be false. A counter-example can be found in Atiyah and Macdonald's Introduction to Commutative Algebra, Exercise 4, Chapter 11 on Pg 126. This ring is "large" in some sense.
My question is that is there some more suitable condition that guarantees that all maximal prime ideals in an integral domain have the same height?