A panty liner is meant to be worn for one day. If you plan to wear one overnight, I recommend putting on a new one at nighttime. If the panty liner feels moist, that is a good time to change it, too.
I don’t think there are any hard and fast rules for panty liner, just personal preference – though you should change it after a day at minimum. Obviously, if you are wearing one on a very light day or to supplement a tampon, you should change it like you would change a regular pad. But say you’re wearing a panty liner in case your period starts – and it doesn’t start – then I don’t see a problem with leaving the panty liner on for a longer time. If you’re wearing a panty liner for discharge, then the pad-changing rules apply. Basically, if the panty liner still looks fresh and clean, there’s really no need to change it more often than once a day.
If it’s staying dry and clean, I recommend changing it once a day (or as needed due to leaks or discharge). If you’re wearing them overnight, I feel it’s best to change it first thing in the morning, even if the liner is clean. The purpose of changing a “looks-clean-to-me” liner is to prevent an overgrowth of (unseen) bacteria. Hope this helps!