Technically speaking, yes, if batteries are used. But practically, if grid power is available, then it is recommended to use solar in combination with the grid. Solar PV can be integrated with your existing power sources (like grid power, inverter, diesel generator, etc.) in such a manner that the first priority is automatically always given to the solar power to be consumed first. However, if you are using Solar PV for nighttime usage or in a remote location, it is quite common to have battery-backed Solar systems.