Two factors affect how high a ball bounces: the stiffness of the ball's material and the hardness of the surface the ball hits. The stiffer the ball and the harder the surface, the higher the ball bounces.
When a ball hits a hard surface, it sends force to the ground. The ground then returns that force, causing the ball to bounce. A soft surface returns less force, causing a smaller bounce. If a ball bounces repeatedly on its own without being pushed, gravity makes each bounce smaller until the ball stops. A ball that is not fully inflated bounces less than one that is fully inflated, even if the balls are made of the same material.