In the behavioral sciences, ecological validity is often used to refer to the judgment of whether a given study's variables and conclusions (often collected in lab) are sufficiently relevant to its population (e.g. the "real world" context). Psychological studies are usually conducted in laboratories though the goal of these studies is to understand human behavior in the real-world. Ideally, an experiment would have generalizable results that predict behavior outside of the lab, thus having more ecological validity. Ecological validity can be considered a commentary on the relative strength of a study's implication(s) for policy, society, culture, etc.
This term was originally coined by Egon Brunswik[1] and held a specific meaning. He regarded ecological validity as the utility of a perceptual cue to predict a property (basically how informative the cue is). For example, high school grades have moderate ecological validity for predicting college grades.[2] Hammond[3] argued that the now common use of the term to refer to generality of research results to the "real world" is inappropriate because it robs the original usage of its meaning.
Due to the evolving and broad definition of ecological validity, problematic usage of this term in modern scientific studies occurs because it is often not clearly defined. In fact, in many cases just being specific about what behavior/context you are testing makes addressing ecological validity unnecessary.[4]