Spanner: (n) a metal tool with a shaped end, used to turn nuts and bolts.
Wrench: (n) a spanner, usually one which can be made larger or smaller for holding and turning objects of different sizes.
http://dictionary.cambridge.org/
An Allen key has a shaped end and is used to turn nuts and bolts. It is also a wrench, because they are synonyms. Wrench, according to the Cambridge dictionary, is "a spanner," although they say it is "usually one which can be made larger or smaller..." -- that may be true in British English, but not in American English (in American English a wrench include crescent wrenches, socket wrenches, adjustable wrenches, and yes, Allen wrenches. A wrench is a tool for turning things, as distinct from a screwdriver. An Allen wrench is called a wrench because it is wrenched in the same way as a wrench, and is not turned like a screwdriver.