Depends on power output.
Has been legal in Germany for some years but inverters have to be limited to 800W output so it doesn't overload the circut. Additionally, you're limited to 4 panels max 2000w peak total.
A lot of companies also offer batteries where the panels directly plug into and then into the wall. That way you're only feeding into your household when you're using it.
If you set it up correctly a lot of households manage to save up to 35% in electricity.