The horizontal axis always represents the independent variable. Often it is x, but in this case, it's t. The time value does not depend on the height. Time does it's own thing.
The height depends on the time value. The vertical axis, or y axis, is always representing the dependent variable. The notation h(t) helps us see that h must be paired with t, in order to find the value of h so to speak. As the time value changes, so does the height of the ball.