Like most plants, the best time for pruning a yucca is right before it goes into its growth period. This will be in early spring. While early spring is the ideal time, a yucca can be pruned anytime. Just make sure the yucca plant gets plenty of light while it is recovering. Like all things about yucca plants, care and pruning is very easy. It may seem drastic, but I assure you that your yucca plant considers this to be a very normal thing.
Wear gloves as you trim and shape your Yucca, otherwise you will get many cuts on your hands. The pruning will be much easier if you have extra sharp garden shears.
The yucca plant in the above picture was so large we could not walk to the front door. Pruning your Yucca is a bit time consuming but is well worth it. As I look above at our Yucca I think it needs a little more trimmed off the top!