Since mechanical energy is conserved when no external force is applied, in this case, the gravitational potential energy is converted to kinetic energy just as it reaches the ground. After it strikes the ground, a part of this energy is used to deform the apple and other is converted to sound and heat energy.