In metalloproteins, the protein environment modulates metal properties to achieve the required goal, which can be protein stabilization or function. The analysis of metal sites at the atomic level of detail provided by protein structures can thus be of benefit in functional and evolutionary studies of proteins. In this work, we propose a structural bioinformatics approach to the study of metalloproteins based on structural templates of metal sites that include the PDB coordinates of protein residues forming the first and the second coordination sphere of the metal. We have applied this approach to non-heme iron sites, which have been analyzed at various levels. Templates of sites located in different protein domains have been compared, showing that similar sites can be found in unrelated proteins as the result of convergent evolution. Templates of sites located in proteins of a large superfamily have been compared, showing possible mechanisms of divergent evolution of proteins to achieve different functions. Furthermore, template comparisons have been used to predict the function of uncharacterized proteins, showing that similarity searches focused on metal sites can be advantageously combined with typical whole-domain comparisons. Structural templates of metal sites, finally, may constitute the basis for a systematic classification of metalloproteins in databases.