A couple nice things about SF on this topic:
1. Davis Stirling (Housing related laws) mandates that building associations cannot prohibit owners from installing solar panels. Basically, they have to work with you to find a way and can't just say no.
2. As of this year, SF is the first city to require that all new buildings (10 stories or less) have solar installed.