Music stuff like
does the guitar inspire you?
Can it produce the sounds YOU need for YOUR style (like fat powerchords and leadsounds for rock, or stratlike cleansounds for pop and funk…)
does it have the tonal qualities you need – Singing single notes, even sustain (no bad “dead spots” where notes fade out very fast), transparent chords, or maybe a tight low b-string
is it versatile or a one trick pony (both can be good)
Personal stuff like
does it look good,
can I afford it
will it get me psyched when I pick it up?
(weight is also very important, if you get an aching back from your rocking guitar, you probably will get rid of it sooner or later but then again some heavy guitars just sound very good :-))
If you can, try different guitars, even from the same model, as most instruments are made out of wood, the tonal quality will be different. (don’t buy the instrument from the shelf, but the one you tried, a student of mine checked out a guitar and the got “the same” only that it was faulty)
If you dont feel like you’re experienced enough ask a friend to give you a second opinion.
If you’re buying at a store try checking out the dealer, is he just selling something, or does he answer your questions well, does he show you alternatives or just push you in one direction, of course there may be dicks selling great guitars, but if you’re treated arrogantly be cautious. Don’t let yourself be bullied into buying a guitar that is not perfect for you.