What are some reasons why the same species sometimes reproduces sexually and other times asexually?
The answer generally applies to the success of species utilizing only one strategy or the other.
Asexual reproduction, in which the "offspring" generation is genetically identical (in effect, a clone) to the parent, is a good reproductive strategy when the environment is fairly constant. If an organism is well adapted to the environment, and the environment stays pretty much the same, then the organism will tend to be successful with the same genetic makeup as its parent.
Sexual reproduction, in which new combinations of genes occur, is especially useful in a changing environment. If the species needs to adapt to new situations, then having offspring with new, potentially beneficial combinations of genes will make it more likely that the species will survive the changes. Some of the offspring will not survive; that combination of genes will die out. But the chance that some of the new genotypes will be more successful than the parents is the driving force of evolution.
Species that utilize both sexual and asexual reproduction include many plants but organisms from other kingdoms, as well; examples include sea stars, slime molds, and some types of insects.