There's a whole myth, which started back in the RBY days, where Rare Candy use was a bad idea. To be fair it was. The more battles you participated in, the higher your stats, all up to a certain point.
Nowadays, with the EV system, you only have a fixed number of extra points gained in battles for raising stats, and even then you can generally only get two stats maxed out. Since this limit is capped (at 510 EVs), it doesn't matter when you use Rare Candy, just as long you know to keep track of the EVs you have.
To be fair, Rare Candy should only be used on later levels, since they are more efficiently used at L99 than L59 for example, because of the higher Exp required for a level gain. And of course, having lots of Rare Candy spare is good for checking IVs.
What I generally do is level up to around L96-99, and use Rare Candy for the last few levels, sort of as a reward for all the hard work. Of course, I have 3 Lucky Eggs and a few versions to trade through, so I can maximise my levelling a bit easier. Pick Up gets you some Rare Candy too. (and while you are levelling, you can get quite a few RCs this way).