There are lots of different ways it can be done, it would seem logical to me, to run the solenoid an hour before lights on to let the co2 build up in the water, some people would then switch it off an hour before lights off, reasoning that there is enough co2 still in the water until the end of the light session for that day, id probably wait until lights off myself before i would turn the solenoid off. Id probably also keep the co2 running during any siesta session when the lights are off for a couple of hours during the middle of the lighting period for that day.
But some people will do it exactly as you are thinking, turn it on at lights on, there are subtle variations in the solenoid setup, i suppose at the end of the day its personal preference, some just want to save gas.