whole foods are better
protein shakes are best straight after a workout because they are really quickly absorbed but it's better to eat real food.
if you're an ectomorph (i.e. tall and skinny and struggle to put on weight) it is totz fine to have a mass gainer in between meals so you can get enough calories in because it's difficult to eat like 5-6000 calories a day of whole food.
Other than that, though, there's nothing you can get from a protein shake that you can't get from whole foods (and then some, i.e. fiber)