I think the simple is "Yes". Energy weapons have no recoil and as such you'd not need to add special structual reinforcement to channel the recoil energy away.
"Would they" is probably a better term. I think only PC's would come up with the idea of mounting weapons on a civilian structure. In theory you'd expect anyone to mount weapons on targets that wouldn't house civilian population - or at least if we are talking ground-to-orbit or starship classed weapons. A Km distance (or even ten Km) to place the weapon outside a civilian area would have no real difference for the ground defender and it would (possibly) make the civilian structures less of a target. Anyone employing city-smashing weapons won't care of course.
Now, if you are using ballistic weapons like in WW2 or prior, then placing weapons on structures (or building them to mount them) is quite reasonable. I give you the Hardrock Flak-tower hotel!
https://hamburg-business.com/en/news/hard-rock-hotel-open-flak-tower-heiligengeistfeld