Lots of variables determine what goes on. The supps can't cover it all, and I've seen it change from different events. The determining factor goes eventually back to the chief steward. I've never seen any car worked on during a black flag that didn't get penalized. I have, however, seen it okayed by the chief to work on cars during a red flag that will return to green when conditions permit.
The clock normally runs during a black flag all situation, but, depending on the situation, time may be added to a session to compensate for the down time. I've only seen this during practice or qualifying at a National race. I've never seen it during a race, although, at a National race, I can assume it might take place if the contest is stopped early in the laps and the situation takes a long time to correct.
During a red flag, in all but a very few situations, the clock stops for the race.
Many things can sway the decision of the chief steward. Severity of the situation is only one of them. We race during the rain, so that's not a problem. If conditions deteriorate to where there is no visual communication available between corners or there is lightning or there is a multitude of disabled cars off course in dangerous areas (determined normally by corner workers), then things get stopped. If the time duration appears that it will extend until completion of a normal event won't occur until after sunset, then the clock can be allowed to run. In some cases, rental on a track may end at a predetermined time that makes completion of the event critical. Clocks run in such a case.
Simply put, it's a rare time that the clock will stop during a race weekend, but it does happen.
