Installing solar on your roof for the sole purpose of selling back to the utility is a bad idea. The whole idea for this came from some smaller solar companies realizing that they can trick homeowners into this where the local utility will pay them for the electricity and then the solar company in turn pays the homeowner pennies on the dollar.
There's a podcast about this that explains the topic in detail:
Why prices for rooftop solar might be higher than they should be : Planet Money : NPR