Get Riolu's Friendship (or, Happiness) level up to 220 or higher. This will level up Riolu into Lucario. Raise Friendship/Happiness by having Riolu hold a soothe bell, walking steps, getting a massage, or taking vitamins and EV berries.