I suppose the two main factors are how comfortable the location is and how likely the location is to have problems should the weather play an influence.
For comfort, the best location will be flat, free from bumps, and objects such as sharp rocks or sticks which can damage the groundsheet. Even with a decent sleeping pad or mattress, it isn't very nice when the ground is sloping and you slide about all night.
Regarding weather, the best location would provide shelter from strong winds, be unlikely to flood in heavy rain (not in a dip or near a river which is likely to rise), not be exposed to possible rockfall if camping near cliffs, etc. and not be in a dangerous location when lightning threatens, such as near a tree. Also it's best not to camp under trees as a branch could fall off (or worse, the tree itself may fall) and even though they provide some shelter from rain, they will drip on the tent for hours after the rain has stopped.
It is always handy of you can find a decent location near a good water source as this will help avoid having to carry water too far.
Obviously strong winds could be a problem in that there could be damage to the tent if the wind is strong enough, but even with moderate winds, it can be difficult to get a good night's sleep with the noise of the tent material flapping in the wind.
You may also have to consider whether you need to ask permission to pitch your tent at your chosen location.