Depends. If I need a new roof anyways, sure that's a good idea.
However panel cost is so low these days it is the installation that cost the most. With the recent political climate against net metering I'd be very careful to buy my own. If I do it I will do it with a purchase agreement and let another company take the risk of metering related law changes in the future.
My municipal is going with a purchase agreement with a utility scale (more cost efficient) renewable anyways, so it doesn't make sense for me to do it for any environmental reason. In my mild climate I don't see a financial reason to do it unless I need a new roof. In Arizona or Texas? Maybe.