The best time to take a protein supplement depends greatly on why you are taking the supplement in the first place! Proteins are basically chains of amino acids, held together by peptide bonds that are broken down in the stomach, and the digestive tract, through enzymatic action. The amino acids they contain have many functions in the body, however their role in the building of cells is primordial, and what they are best known for!
All cells die. Billions of them die every day, and are replaced by brand new ones. For this reason, even non-bodybuilders or people that don't exercise at all have a need for a steady, quality supply of proteins and amino acids in their diet. Failure to fulfill this need can lead to premature aging, muscle degradation as well as more severe, permanent consequences.
Amino acids are divided in two groups: essential, and non-essential. All are important, however the body can create, or synthesize non-essential amino acids from others, so they need no necessarily be included in the diet. Essential amino acids, on the other hand, cannot be created by the body, so everyone must get them through their diet.
All meats, dairy, eggs as well as some vegetal sources (such as beans and lentils) contain all essential amino acids. They are called complete proteins, and are much sought after. This brings us to the point of the proper timing of protein supplementation. Vegetarians, as well as vegans, can be at risk of not getting enough protein in their diet because of their food choices. In their case, protein supplementation, either in the form of whey, casein or egg albumin, is recommended.
Obviously, this is not an acceptable choice for vegans; they have the option of choosing supplements containing soy protein isolate, which is also a complete protein. In terms of timing, people taking supplements because they lack enough complete proteins in their diets can take them whenever they please, although most choose to have them with a meal, to keep things simple.
Bodybuilders and athletes, on the other hand, who use protein supplements for the express reason to build new muscle mass, should take theirs immediately after their workouts. Workouts damage the muscle cells, and without a proper amino acid saturation, they cells will repair themselves by stealing amino acids from other, healthy cells, a condition called protein catabolism which leads to muscle degradation.
The essential Branched Chain amino acids L-Leucine, L-Isoleucine and L-Valine can be metabolized directly inside muscle cells, and will contribute to igniting anabolic growth. This means that your body will start taking advantage of all available amino acids to repair, recover, and eventually grow. Some athletes also like to take their protein supplement before workouts; however research has so far shown that more benefits will come to those who take them afterwards.