Here's what you need to do:
1. Make sure you have a Sun Stone: This is the key item for Petilil's evolution.
2. Give the Sun Stone to Petilil: Equip the Sun Stone onto Petilil.
3. Level up Petilil: You'll need to level up Petilil while it's holding the Sun Stone. The exact level might vary depending on the game you're playing, but generally, it should evolve around level 18 or higher.
Important Note: Make sure you're not trying to evolve Petilil during the night in the game. Some games have time-based mechanics that could prevent the evolution if it's nighttime.
If you've done all of this and Petilil still hasn't evolved, there might be a bug or something else preventing it. Double-check that you've followed all the steps correctly and try again. You might also want to check online forums or resources for your specific game for more information on how to evolve Petilil.