The scientific method defines a set of practices and conventions which will tend to create increasingly accurate theories about how the world works. Experiments carried out according to the scientific method seek the effect one variable has on another. Isolating the dependent variable is important because it clarifies the effects of the process on the independent variable under investigation.
TL;DR (Too Long; Didn't Read)
Testing only one variable at a time lets you analyze the results of your experiment to see how much a single change affected the result. If you're testing two variables at a time, you won't be able to tell which variable was responsible for the result.
Variables are factors in an experiment that can change. There are three types of variables in a scientific experiment: independent, dependent and controlled variables. The scientist changes the independent variable in a systematic manner and measures the effects of this change on the dependent variable. The other variables are called controlled variables because the experiment is designed to keep them at an unchanging value, known as "controlling" a variable. A valid experiment should have only one independent variable.
Purpose of an Independent Variable
An experiment attempts to trace the causal relationship between two factors in a natural process, such as the effect temperature has on the rate of a certain chemical reaction. To limit the measured effects to a single causal relationship, it is important to pick one cause to vary (the independent variable, such as temperature) and one effect to measure (the dependent variable, such as reaction rate). Allowing multiple variables to change creates a tangle of causal relationships and makes it harder to trace which change is having which effect.
Sciencing Video Vault
Confusion of Variables
Imagine an experiment designed to test the effectiveness of a new fertilizer. If the design included two independent variables by, say, altering both the amount of fertilizer and the amount of water each plant received, it would be impossible to tell whether the healthiest plants grew well because of the fertilizer or simply because they received more water than the others. Isolating one independent variable makes it possible to confidently attribute different results to variations in that factor.
Since multiple uncontrolled variables confuse the results of the experiment, it is important to find and control all the relevant variables that could affect your experiment's outcome. When designing an experiment, think carefully about the physical and environmental factors that could change the results and devise ways to keep them constant. Research similar experiments that others have carried out in order to find variables you may have missed, and study the common systemic errors that can skew the results of any experiment.