It's an interesting idea. I did some napkin math based on the Solaris Urbino 18 bus. The buses have about 45 square meters of ceiling area (18m by 2.5m). Assuming efficient solar panels you could get 250w/sqm. That works out to 11.25 kwh/hour. The bus advertises with 600km of range with 800kwh of batteries so that is 1.33 kwh/km. Hence it could do ~8km/h on average when it is sunny.
The math does not really work out to a viable product with this bus, but it is not too far off. A city bus that has been purpose-built for low speed in urban areas without other traffic may work as it can make some sacrifices. For instance, since it runs much slower on average it would need smaller engines. It could also use more light-weight material since it won't need to handle high speed collisions. If it is just used for short distances within a city center it could also do away with seats. Lower speed should also lead to lower consumption.
The Solaris Urbino 18 weighs 17.5 tons curb weight. Assuming fuel consumption is pretty linearly related with weight and you could get it down to less than half, you could get a bus with a range of 10 miles per hour of charging. If it drove for 6 hours a day, but got charged for 12, 20 miles on average per hour is possible.