Diet is such a tricky subject. It's so easy to make sweeping generalizations that make no sense for the specific situation though. To gain muscle, the FASTEST route is to eat a huge excess of calories, including a hefty amount of protein. But is that the best? Not necessarily. You're going to put on a lot of fat along with that, which is not something most people want. (I've put on a bunch of fat as well, to the point where my wife is starting to give me shit...).
On the other hand, too few calories and you'll never get any stronger or gain muscle. Or continue working out. So most people end up compromising somewhere. If you make the wrong compromises, you stall or get worse.
Basically, this is why I don't answer vague hypotheticals like Oblivion asked. You need info on goals, time frame, current condition, current workout level, motivation (yes everyone is motivated to look awesome, feel great, get stronger and faster and fitter, but how far will a person actually go to achieve their goals?). I don't like to just say 'eat this much protein or this may calories and you'll gain muscle'.