It is as free as nuclear, or water generated. The infrastructure must be installed and maintained. Panels, their cleaning, changing failed/broken, inverters, cables, batteries (eventually).
Right now it is mandatory to install in Germany after a major roof renovation. Turns out the typical small home electric needs are about 1000 EUR per year, the installation of a solar system is about 25000. I do not see what is free…