Yes, because the environment can factor into the distribution of traits.
Sunlight can influence traits such as pigmentation in organisms, which can lead to changes in the frequency of those traits in a population over time through processes like natural selection.