That depends on where you live. In my area, labor is cheap and the costs of panels, batteries and inverters came down significantly over the last 5 years. You can now break even on electricity costs for a residential pitched-roof installation in under 5 years. This is without any subsidies, without selling anything back to the grid.
Utility-scale solar installations also make a lot of sense, but around here transmission capacity for that is still a massive issue. You can install more transmission capacity, but it's not cheap.