Yes, pergolas can be an excellent place to put solar panels because the space would otherwise be going to waste. You will need to consider the weight of your solar panels and the strength of your pergola to see how many solar panels your pergola can withstand.