This is harder than anticipated. I keep re-arranging things based on reasons that are hard to explain. Like, I don't consider myself a brand snob... but I won't buy a mountain bike from Motobecain... and probably not from a few other manufacturers that actually make decent bikes, simply because of horror stories I hear about getting warranty replacement, or other customer service issues.
The main constant I see is that getting the right frame is of utmost importance. It defines fit, and the usecase/usage (ie, get the right size, and style/travel of bike you actually need/want). Suspension is probably next, but also sometimes kind of not (ie, is it a Yari, where you can drop in a damper in the future with funds... or is it a Rockshox 35... with no upgrade path, and that sucks). Then wheels, brakes, then personally I don't care much about the drivetrain, or stem/whatever.
Something like this.
1. Fit
2. Geometry/Travel/suitability for intended bikes purpose
3. Brand reputation (customer service, reliability, etc)
4. Suspension
5. Wheels/tires
6. Brakes
7. Drivetrain
8. Misc (seat, post, handlebars, stems, grips, etc)