There are a number of things that need to be taken into account when choosing the right spanner for a task. Along with the obvious choice of spanner size (see What spanner sizes are available?), there are a few other things to consider.
The length of the spanner makes a difference to how much force can be applied to the fastener. Longer spanners create greater torque (turning force) so are better for larger or stiffer fasteners.
The profile of the spanner affects the stability of the connection between the spanner and fastener. Profiles that make greater contact with the fastener (such as box spanners) are less likely to slip from the fastener than spanners that only contact a few sides of the fastener (such as open-ended spanners). However, they may not be so versatile.
The thicker and wider the head of the spanner, the stronger it will be. Thick heads and shafts strengthen the whole spanner and provide more contact with the fastener which means the fastener will take less effort to turn and is less likely to get damaged in the process. On the other hand, wide heads don’t fit into small spaces.
The material the spanner is made of significantly affects the quality of the tool. Tools made from titanium or from steel with a high percentage of vanadium (up to 1%) are the highest quality on the market and could easily last a lifetime. See What are spanners made of? for more information.