I'm assuming it's several residences that form a courtyard. I think it mainly comes down to whether or not it's a common roof / who is responsible for repairs. It'll likely state it in the hoa docs. Getting approval to put solar panels on a roof where hoa does repairs would be near impossible. It used to be hard enough just to put a satellite dish on a balcony.