Recent reports of externally triggered, controlled adsorption of carbon dioxide (CO2) have raised the prospects of using stimuli responsive metal-organic frameworks (MOFs) for energy efficient gas storage and release. Motivated by these reports, here we investigate CO2 adsorption mechanisms in photoresponsive PCN-123 and azo-IRMOF-10 frameworks. Using a combination of grand canonical Monte Carlo and first-principles quantum mechanical simulations, we find that the CO2 adsorption in both frameworks is substantially reduced upon light-induced isomerization of azobenzene, which is in agreement with the experimental measurements. We show that the observed behavior originates from inherently weaker interactions of CO2 molecules with the frameworks when azobenzene groups are in cis state rather than due to any steric effects that dramatically alter the adsorption configurations. Our studies suggest that even small changes in local environment triggered by external stimuli can provide a control over the stimuli responsive gas adsorption and release in MOFs.