The trend towards increased automation has been talked about for a very long time, but has moved slower than many people thought. Personally I think the rate of change will remain slow enough to allow society to adapt without major negative consequences.
Overall, this trend will further enhance the characteristic behaviour of a capitalist system which we are quite used to by now: increased efficiency at the cost of increased inequality. People who have the financial discipline to start investing in a capitalist system gain claims on the production of others which can again be leveraged to buy more such claims, thus leading to exponential wealth accumulation. For this simple reason, the wealth gap between the investor class and the rest will always tend to increase. With increased automation, it will be the same thing: those who start investing gain claims on the production of machines which can again be leveraged to buy more such claims. The income gap between the skilled and the unskilled will also increase further as productivity-enhancing technology improves, whether through automation or any other means.
In general, this only implies that our wealth and opportunity redistribution systems need to become even stronger than they are today. As long as this change happens slowly enough, our political system should handle this without major problems. Many people will not be happy with this (as they are already now), but we will have little choice.
About clean energy, the "good" thing is that clean energy is generally less economically efficient than dirty energy. The clean energy transition will therefore require more work per unit energy produced, thus creating more jobs. We just need to make sure that we keep going in one direction. For example, a subsidy induced solar/wind boom followed by a bust when the subsidies are ended is not good for anyone. Similarly, if the US shale revolution follows some of the more pessimistic projections, we will see a large shift from coal to gas followed by an equally large shift back from gas to coal. This will also lead to some serious economic inefficiencies.