it varies. Seat pins have markings on them but these assume that the frame has a certain strength and loading. Needless to say the length of the seat pin out of the frame and the weight of the rider makes a difference too.
So if the frame is small, the seat pin is out miles (and perhaps doesn't fit that well either), and a heavy rider is using it offroad (or has a pedalling style that causes a lot of bobbing) then the leverage in the frame can be huge. [By contrast in the 1950s folk had their saddles barely above the top tube on their road bikes and I have seen such bikes used with as little as ~1-1/2" of seat pin in the frame; indeed seat pins were often made very short to start with; 6" long (including the 7/8" bit that the clip fits to) wasn't uncommon.]
The former situation is pretty common these days and even 90mm insertion isn't always enough for complete reliability; ideally you want the seat pin to fail before the frame does, but it can easily happen the other way round if the seat pin isn't far enough into the frame. If the seat tube projects above the top tube, in most cases the arrangement is unlikely to be really robust unless the seat pin extends into the frame well below the top tube. I have seen plenty of aluminium frames where the projecting part of the frame has cracked.
If the frame is sleeved internally or a shim is fitted, then you can't usefully have a larger overlap/insertion that does any good. Usually this is thought through fairly well, but not always. If you have a shim then the best thing is to delete it and fit a seat pin that is really the right size for the frame. It isn't a bad idea to run a reamer into a welded frame to be sure that the seat pin fits the tubing accurately, rather than merely be sized to slip through the distorted welded area, and be a slack fit in the tubing.
If you want a simple rule of thumb, I'd suggest at least 60mm insertion for a frame with a horizontal top tube and a seat pin less than 250mm long, at least 75-90mm insertion in a compact frame with a longer seat pin, and more again if the seat tube has a projection. But basically the more the merrier, up to a point. BTW when the seat pin goes into the frame a long way, it isn't sufficient to just grease the seat pin; the grease is wiped off by the process of insertion. It is a much better idea to grease the inside of the frame and the seat pin; that way there is more likely to be grease for the full insertion depth.
cheers