This mod is not known to work with the latest version of Kerbal Space Program. Proceed with caution.
DefaultActionGroups lets you do that. It allows setting up custom config files that will automatically configure action groups for whatever parts you like.
Doing this requires tinkering with ModuleManager config files. If you're comfortable using a text editor and writing ModuleManager syntax, then you can make it do pretty much anything you like.
However, if you're not into tinkering with config... you don't have to. DefaultActionGroups provides several "sample" config files that do various useful things. You can pick the ones you like (e.g. "solar panels in Custom01") and just install those; see installation instructions below. And if you don't mind doing a little bit of tinkering, but don't want to have to learn all the arcane ModuleManager syntax, you can use these sample files as a starting point to work from.
The mod includes several "optional" configs that do various interesting things. You can install any of these you like, or use them as examples for making your own configs.
Currently included optional configs:
If you're comfortable writing ModuleManager config, you can add custom configs of your own to do pretty much whatever you want. If you're having trouble figuring out how, feel free to ask for help in the DefaultActionGroups forum thread!
Heartfelt gratitude to Diazo, without whose excellent help I wouldn't have figured out the minutiae of tweaking action groups. Any goodness herein is thanks to his assistance, anything wrong is entirely my own doing.
Thanks also to the folks who provided helpful suggestions for additional configs:
Raw stats are from the beginning of time until now. Each follower and download entry represents one hour of data. Uneventful hours are omitted.