There is no definitive answer to when a PFD should be discarded and replaced as it depends on a number of factors, including how often the PFD is used, how well it is cared for, and the manufacturer's recommendations. However, as a general rule of thumb, most experts agree that a PFD should be replaced every 5-7 years.
PFDs are made from materials that degrade over time, so even if a PFD looks like it's in good condition on the outside, the materials inside may have degraded to the point where it is no longer effective. Additionally, manufacturers often make improvements to their designs and materials over time, so even if your PFD is only a few years old, it may already be outdated.
If you use your PFD regularly (i.e. more than once per week), or if you live in an area with harsh weather conditions (salt water or high UV exposure), you may need to replace your PFD more frequently. Conversely, if you take good care of your PFD and only use it occasionally, it may last much longer than 5-7 years.
No matter how well you care for your PFD or how often you use it, eventually it will need to be replaced. When shopping for a new PFD, look for one that fits comfortably (you shouldn't have to adjust straps constantly), has plenty of buoyancy (at least 16lbs for adults), and comes from a reputable brand. And always check the expiration date!