All of them, they are all problematic....
Just kidding. Just a few notes:
2002: This is the year of the "Glass Trannies"
Early 2003: Also had the "Glass Trannies"
2006/7: Third gear has a problem with too much power over 300WTQ I believe, someone correct me.
2008: Worst WRX/STi (sorry, just being honest). The first batch of the 3rd generatin. These cars are softest sprung from the factory, plus the 2008 WRX is the last model year have less than 265HP. Worst of all, they look like Corollas.
Early 2009: Many would spin rod bearings in it's infancy. Check for changed short/longblocks.
2008 and early 2009's are the only true models to watch out for. There are plenty of owners here that have high powered 02 and 03 cars on original transmissions. You gotta remember, these cars are AWD grip-fiends. When you dump the clutch your tires won't break. Unlike a FWD/RWD car where the tires DO break, all that stress is going straight to the transmission *boom*. Don't EVER dump the clutch.
As for buying new or used. slightly used ones are going for almost the same as a new one. Buy new unless you find an cheap older model that is UNABUSED(HA!).