With Winchester's obviously pre-64 is the gold standard because everything was hand fitted and they used better parts. But after 64 they started slowly making changes for the better. For me, 64 till 77 (inclusive) are the bad years. In 1977 they went back to milled steel receivers. I don't know when that happened in 1977. I have a 77 vintage and it was after the change, but I tend to try to stay away from 77s. Then in I think 1982 they sold out to USRAC and introduced angle eject. I'm not 100% on the year, but it's easy enough to tell when you're looking at an AE model and those are a hard no for me. But I've heard from people I trust that the factory in Miroku is making good rifles, so if you want a brand new one, it should be a good one.
Marlins are a similar but simpler story. Look for the JM stamp unless it's obviously a very old gun. The current Remlins are good quality again (again, this comes from sources that I trust not personal experience), but that's been within the last year or 2. So if you get a new Marlin, make sure it's hot off the presses and not something that's been sitting in the shop for a couple years.