Mass affects a ball's bounce through kinetic energy. The more mass an object has, the more kinetic energy it has when dropped, due to gravity.
The kinetic energy causes the ball to deform upon impact. How much the ball deforms is based on its chemical makeup, or in this case, elasticity. When the ball deforms, the kinetic energy is converted into potential energy. As many kinds of balls have high amounts of elasticity, the potential energy converts back to kinetic energy when the deformation of the ball returns to its normal state. If the force of impact is too great for the ball to absorb, it may collapse and lose its bounce as the energy is dissipated in a different manner.