As we know that potential energy of the ball is given as

here we know that
m = mass of the ball
g = acceleration due to gravity
h = height of the ball from ground
now as the ball moves upwards the height of the ball will increase while as the ball will go down the height will decrease
So as per above formula we can say that potential energy of the ball will directly depends on the height of the ball and here first height will increase and then height will decrease.
so here correct answer will be
A. As the ball goes to higher heights, the potential energy increases and when it comes back down, the potential energy decreases.