If and when they leak
Seriously though, since many leaks start on the underside of the tank, you have to open the tank coffin and pull the tank to check. That's a big job usually and if you are going through all that effort you might want to consider replacing the tank.
How long the tank lasts is hard to answer. To a large extent, the useful life depends on two major factors; the waters the vessel was operated in and the wetness of the coffin and bilge.
Note that poly tanks can last a really long time.
So my advice is to take a look at what you can easily see, take a sniff regularly and look for fuel in the bilge or tank coffin
One complication is that the fill and vent hoses often wear out before the tank, so it's important to try to distinguish leaks or fumes from hoses as opposed to tank seepage.
Hose issues are more likely to cause odors after gassing up and tank seepage can make odors' stronger after the boat sits for periods of time. Sender flange leaks are more likely after filling of after a cruise.