If treating the main tank and running CO2 then best to
QT the fish and then yes in the QT tank turn off the light to ease stress. If you weren't running CO2 I would still recommend turning off the lights. The planted tank people will have to chime in as to how it would affect the fish to turn the lights off in the main tank with the CO2. The fish will fair better with less light. Similar to if you had a migrane, lying down with the lights off would ease the stress on the head.