We develop a model for the industry dynamics in the electricity market, based on mean-field games of optimal stopping. In our model, there are two types of agents: the renewable producers and the conventional producers. The renewable producers choose the optimal moment to build new renewable plants, and the conventional producers choose the optimal moment to exit the market. The agents interact through the market price, determined by matching the aggregate supply of the two types of producers with an exogenous demand function. Using a relaxed formulation of optimal stopping mean-field games, we prove the existence of a Nash equilibrium and the uniqueness of the equilibrium price process. An empirical example, inspired by the UK electricity market is presented. The example shows that while renewable subsidies clearly lead to higher renewable penetration, this may entail a cost to the consumer in terms of higher peakload prices. In order to avoid rising prices, the renewable subsidies must be combined with mechanisms ensuring that sufficient conventional capacity remains in place to meet the energy demand during peak periods.