The regulator for energy suppliers in the UK is Ofgem. Ofgem stands for the Office of Gas and Electricity Markets with a principal objective of "protecting the interests of existing and future gas and electricity consumers", and they do this by;
Promoting value for money services
Promoting sustainability and the security of supply
The development and supervision of competition
Implementing, regulating, and delivering government schemes.
While Ofgem does not deal with complaints directly, those that are raised to the ombudsmen are kept in records.
This information that contains the number of complaints made and what they are about, is then published and made available to the general public. This gives customers the opportunity to check when it comes time to switch business suppliers.
Suppose a high number of complaints are held up against a particular supplier. In that case, Ofgem has the power to apply sanctions that can prohibit them from taking on new customers to ensure they take the steps necessary to resolve whatever issues are taking place.