Simulating the control of molecular reactions via modulated light fields: from gas phase to solution