What Riolu needs
- High friendship.
- A level-up, not just waiting.
- Daytime in the game when it levels up.
Troubleshooting
Check that you are actually gaining a level, and that it is not night in the game. Even with the Best Friends Ribbon, it will not evolve unless these conditions are met.