Anything after the 1998 model year is fine, because they went from a timing belt to a timing chain, which I believe is important if you don't want to commit to a changeover every 100,000 miles (because it runs expensive - and your Corolla can have a long life when TLC'd for). I myself am partial to the 9th Generation (2003 and over) model years and currently own one, because of the availability of DIY maintenance guides and videos and the abundance of aftermarket parts which sometime work out better than expected at a lower cost.
Find an independent mechanic near the seller who will answer all your questions - introduce yourself over the phone, tell them you are looking to buy, and would need to have an inspection done, and ask for advice. Inform the seller that you would like to take it to a your mechanic prior to purchasing the car. If the seller disagrees, walk away from the sale. To me that's a red flag. Unless I'm buying used from a dealer - and even then ask them pointed questions about maintenance cycles. Do not buy a car which was used as a student driver car, do not buy one that was used as a rental car or was leased - was likely driven around by leadfoots(Trademark phrase :)) Ask the seller if they have complete maintenance receipts - you don't want to find out much later that they went 20,000 miles between an oil change on a Corolla of the vintage you're considering.
In the meantime, go to Toyota Nation website and look at their threads for guides on specific model years so you get educated at a high level, on what are the big ticket maintenance items (e.g., transmission, water pump, engine head gasket), and which ones are minor (e.g., spark plugs, belt tension adjustment, seals, fluids). Learn to recognize problems rather than symptoms. Research, research, research, so you can understand your mechanic's "language".
Good luck, and post specific questions here!