The majority of solar arrays are grid-tied, meaning they are connected into the local power grid. In these cases, if the grid goes down, causing a power outage, you will lose power too. Your panels will automatically stop producing electricity as a required safety feature. If your solar panels continue to produce electricity and feed it back onto the grid, it could cause serious harm to utility linesmen working on the wires.
If you want your solar panels to continue producing electricity even when the grid goes down, you will need to pair your solar with batteries. This pairing – called solar + storage – allows your panels to produce electricity while remaining isolated from the grid, avoiding any safety issues. That electricity will be stored in the batteries for later use if it is not immediately consumed by your home or building.