The independent variable is the variable that causes the dependent variable to change.
In this situation, the number of days of sunlight will cause the height of the tree to change. Additionally, the number of days of sunlight will cause the amount of fruit on the tree to change.