Well, there's no hard and fast answer here. The short answer is that yes, trimming trees will help your solar performance. However, there are many factors to take into account such as temperatures in different seasons, and, most importantly, aesthetics!
For example. This author is currently grappling with tree trimming due to shading. I've let it lapse, and that's because an amazing Frangipani tree is in the way. The aesthetic benefits in my mind outweigh the extra kws that could be generated. However there is another aspect to this. I'm in credit with a 13.2kw system. So a few extra dollars aren't the main goal here. If however, you have large bills, then you'll have to weigh up which is more important to you.
Another important factor is any future changes in usage. If you want a Tesla or something similar, then we would certainly encourage it. However, that's dependent on your current bill and system size.
So in summary should you trim? Yes, yes you should. In most circumstances. Panels do work with tree shading, they have bypass diodes and many aren't wired in series these days, so one bit of shade won't ruin them all. But they will work better without any hindrances.