In John 15:1-2 (NKJV), Jesus says, "I am the true vine, and My Father is the vinedresser. Every branch in Me that does not bear fruit He takes away; and every branch that bears fruit He prunes, that it may bear more fruit."
The pruning of a believer involves the cutting away of sinful, harmful, negative, and non-productive elements in the believer's life. Because cutting is an inherent part of pruning, it can be a very radical and very painful process.
God prunes in believers' lives in order to cut away all of the sin and junk and garbage that is keeping us from being more fruitful.
It is never a pleasant experience when the pruning is happening.
But it is necessary.
If God is pruning you right now, though, take heart. It means that He knows that you can be more fruitful for Him, and He loves you and cares enough for you to help you in the process.
Pruning is not done out of punishment. It is done out of love, by a Heavenly Father who knows what is best for us in order for us to be able to bear more fruit for Him.