It's pretty simple - energy prices vary throughout the day, and across days. You compress the CO2 when the energy is cheapest (perhaps around noon because potential solar generation is higher than usage), and decompress at periods of high demand like the early evening when you can sell the electricity at a higher price.
It wouldn't have to be renewables used to charge, but as there is no fuel cost it's solar and wind pricing that is the most variable.
The first-of-its-kind Columbia Energy Storage Project in Wisconsin, by Energy Dome, uses CO2 for energy storage that could last up to 24 hours. Supported by $7 million from the U.S. Department of Energy, the project is targeted towards renewable energy integration and long-term storage solutions.