They detract from a “certain look,” which is what many of those nightmare-HOAs only care about. Makes their houses more valuable, so the poors can’t ever afford to live there, and it feeds their busybodied lust for power over others.
But solar panels, especially owned panels, only add to the value of the house. If anything that makes it harder for “the poors” to afford living in the neighborhood. Obviously that’s not my rationale for supporting green energy but I say it to illustrate that even their own weird and insular logic should encourage solar adoption.
Adding solar panels increases the value of your home (…sometimes—there’s certain insurance companies that might disagree), but having a different home means the other homes are now devalued compared to yours.
Now, you could force everyone to add solar, but the busybodies who head problematic HOAs are often resistant to change.
ETA: I also think it’s dumb, but that’s HOAs for you.