Last weekend's Frome Folk Festival was one of the first events held at the Cheese and Grain powered entirely by solar energy.
The photovoltaic panels were installed last week and the cafe served "light powered" breakfasts and lunches on Saturday and Sunday.
Steve Macarthur, manager of the Cheese and Grain, said: "It's light, not warmth, which creates the electricity, so while there's daylight there is power generation.
"Any electricity generated over and above what is needed is sold back to the grid."
Frome Town council has invested about £90,000 in the panels.
Mr Macarthur said: "It's probably the best investment the town council has ever made.
"It will get its money back over the next few years and then see a significant return.
"But most important of all this is Frome doing its bit to tackle climate change and contribute to the move to clean, sustainable energy."
Town council chief executive Vernon Anderson said: "Installing PV panels on the roof of the Cheese and Grain generates an income for the town council that in turn can be invested in other projects.
"In addition, a large area of solar panels promotes Frome as a town leading the way in sustainability."