The extent to which the conditions simulated in the laboratory reflect real life conditions. Using an experimental laboratory-based research method, as has been the tradition in Cognitive Psychology, rigorous control for confounding variables is put in place and the ideal is that the researcher can study the only the phenomenon of interest. By manipulating variables (so-called independent variables) in the experimental setup and observing the changes that result (measured in the change of the dependent variable) the researcher can infer causality: If (independant) variable X is changed, (dependant) variable Y also changes. By rigorously controlling for confounding variables and confining the experiment to the laboratory, the results can very well lack applicability and generalisability with regards to the richness of everyday life. Ecological validity refers to an acknowledgment of the fact that human action is situated and highly contigent on contextual factors/variables. To obtain 'valid' results, humans should be studied in the richness of their natural environment.
The same shift from laboratory-based to more 'ecological' research methods is not only evident in Cognitive Psychology, but also in the HCI community where traditional laboratory-based usability-tests are overtaken by observing the user or conducting user experiments in the user's natural context (the context of use).