State based learning is the phenomenon in which a person experiences improved recall of prior information in an environment and/or mental state similar to or the same as that in which the information was learned. Fundamentally, the most cited proposed pathway by which it operates is associations between the environment and the information learned. You and I experience state-based learning every time we walk into class and recall what occurred last time in that class as well as similar phenomena every time we walk into "that" restaurant where we were broken up with by a previous gf/bf (or where we had our first kiss, etc.) -- it's basically a derivative of classical (Pavlovian) conditioning.
The concept has been tested in a number of cognitive psych experiments with consistent results. The application to studying would be to study in an environment as similar as possible to that in which you will be tested. Additionally, this means you should study in the same mental state as you will take the exam (i.e., if on Ritalin or caffeine when studying, you should be on same drug when taking the exam -- they've actually done experiments showing that if high on MJ when studying, you will perform better high on the test than you in a normal mental state, same w/ alcohol).
For that reason, I personally avoid studying or taking tests when tired or on caffeine (or any other drug). I don't play music, watch TV, study w/ friends (for the most part -- unless I really want to put off the studying itself, haha), etc., because I find it distracting when studying.