One of the times that your body is in need of protein the most is immediately following a workout.
Since your body starts to heal the muscle right after a workout, taking protein at that time will give the body the fuel it needs to heal and grow.
Because solid food takes more time to digest and to break down the protein and send it to the muscles, it can be best to take a protein shake immediately following a workout, since protein shakes only take about 30 minutes to reach the muscle after ingestion.