Provided with the same amount of energy, lighter balls launched from a trebuchet will fly farther than heavier ones. This makes sense in our everyday experience: Using the same arm, you can throw a baseball quite a bit farther than you can a bowling ball, for example.
However, the ball's weight affects more than the distance it will fly. A lighter ball traveling at the same velocity as a heavier ball will land with less force. That's why some of the lighter stone balls launched in our trebuchet simulation hit the mark, yet bounce off harmlessly. The stone's mass is not great enough to break through the sturdy castle wall.
With too heavy a ball, you may suffer the same fate as you wished to inflict upon your enemy: The ball could fly straight up and back down. That's because your trebuchet cannot provide enough energy to counteract the pull of gravity that holds your heavy ball down.
There is danger, as well, in erring in the direction of too light a ball. Too light a ball might not be able to accept all the energy that the trebuchet's swinging arm can deliver. Where does the energy go? It may go into the trebuchet's axle pivot, its base, or into its scaffolding, destroying your trebuchet rather than the enemy castle's wall.