It's more your first option. It's very rare in organisms that they respond to changes in the environment by having more mutations than they normally would, but it does happen. But even in these cases the environment doesn't drive the outcome of mutations; mutations are always random influences on the gene pool.
Over time, the beneficial mutations are pooled together to create new species.
It's important not to conflate mutation with speciation; a single species could concievably experience drastic physical change over time without actually being a
new species; rather, the origin of new species is a situation where a formerly large gene pool becomes bifurcated when a portion of the population's individuals are split off from the whole (by geographic distance, for instance; really, anything that would prevent the individuals in the offshoot population from reproducing with individuals from the original population). This sub-population accrues mutations that do not find their way back into the large original population, until a point of genetic incompatibility is reached and the sub-population could never again reliably interbreed with the large one. At that point, we consider it a new species.
In large populations, there's a kind of genetic "homeostasis" that occurs, where their large gene pool is resistant to the fixation of radically new alleles. (Fixation is when one allele of a gene outcompetes all other alleles and becomes the only allele for that gene that any individual possesses.) So drastic morphological change seems to be much more likely to occur in very small populations, which explains the patterns of the fossil record, where species seem to continue largely unchanged for great periods of time subsequent to the rapid appearance of radically different organisms. This is something that we call "punctuated equilibrium."