The CO2 that is produced by the burning of fossil fuels is a negative externality. (A negative externality is a cost that is suffered by a third party as a result of an economic transaction. In a transaction, the producer and consumer are the first and second parties, and third parties include any individual, organization, property owner, or resource that is indirectly affected.
Some externalities, like waste, arise from consumption while other externalities, like carbon emissions from factories, arise from production.)
What we can do is put a price on the negative externality. You can do this through carbon trading or taxation (pigovian tax) this allows for the market to take the external costs into account and the market can be expected to respond with solutions in order to reduce their costs. Revenue neutral carbon taxes are widely supported, recently even prominent republicans have come around supporting the idea. This will send industry a clear signal as to where government wants to go and gives industry some certainty where to invest their considerable resources, or at a minimum, where not to invest.
The change is inevitable, rooftop solar is already cost competitive with the grid in every state over the lifetime of the system The highest cost right now are the installation and permits, as the industry matures I expect those costs to drop as well. This is going to create problems for the grid unless well managed. Allowing households to become producers as well as consumers will give them an incentive to stay connected to the grid and willing to invest in standby generators, grid storage and a smart grid.