If you decide to install an on-grid solar system, you will always have access to electricity (unless the grid goes down), whether or not your solar system is producing or if you have batteries.
If your system is not producing any electricity or not producing enough electricity to power the devices, lights, machines, etc. that you’re using, you can pull energy from the utility grid to supplement it. This ensures you always have enough electricity for what you need.