Environmental factors such as temperature, nutrition, light, and stress can affect the expression of genes, leading to variations in phenotypes.