The following excellent definition comes from intropsych.com
“Stimulus control is a term used to describe situations in which a behavior is triggered by the presence or absence of some stimulus. For example, if you always eat when you watch TV, your eating behavior is controlled by the stimulus of watching TV. (This can be an important insight to some people.) If you are talkative with your friends but you never speak out in a classroom, your speech behavior is controlled by your social environment.
What is stimulus control? What is the difference between consequences and antecedents?
Antecedents are things that come before. In operant conditioning, antecedent stimuli are those occurring before a behavior. Teachers of operant conditioning sometimes say behavior is controlled by its consequences. That sums up much of operant conditioning, but the statement is incomplete. Antecedents can also control behavior. When they do, it is called stimulus control.
Here is an example. When we have a powerful thunderstorm in our lightning-prone area of the country, my wife and I unplug our computers. Our behavior is “controlled” by the occurrence of the thunderstorms, which are potentially antecedent to a damaging electrical surge. Even the best surge protectors cannot protect against a nearby lightning strike. By reacting to the antecedent stimuli of thunderclaps, we attempt to avoid the punishing stimulus of ruined computers.” http://www.intropsych.com/ch05_conditioning/stimulus_control.html