Riolu evolves once its happiness is maxed out, and the evolution has to happen during the daytime. Raise the friendship stat, then level it up while the sun is up.