Riolu evolves when it levels up with maximum happiness during the day.

If you're playing Black/White 2, you can called Bianca on the Xtransceiver to check your happiness, if she says something about jealousy, that means your Riolu is at maximum happiness and it's ready to evolve.