Effects of the environment on the dynamics of driven open quantum systems