Natural selection plays a crucial role in speciation by favoring certain traits or adaptations that enhance an organism's survival and reproductive success. Over time, this can lead to the accumulation of genetic changes that result in the formation of new species.