Of course, it is not as simple as that. It doesn’t work at night and seasonality, atmospheric conditions and variable climate conditions (mostly clouds) mean it is less viable in some parts of the world.
There are other practical challenges too. Solar farms need to cover large surface areas to be commercially viable. This demand for space is also reflected for home-based solar power generation. Large solar panels are dotted on house roofs and buildings – not pretty and certainly not integrated into house design the way architects would prefer.