Metallic bonding and covalent boding
Why do metallic bonds have delocalized electrons, whereas covalent bonds only share electrons? 

To be somewhat flip this is like asking why are redbirds red and blue birds blue?

In order to pigeon-hole bonding ionic, covalent, aromatic, and metallic bonds are "artificial" constructs used to predict behavior. But there are always exceptions, and no bond is purely in any one of the categories. 

So in general a sample which has metallic bonds has delocalized electrons and hence will conduct electricity. Such elements would be metals. If the sample only has covalent bonds then there would not be any delocalized electrons and the sample would be a nonmetal. 

For some elements the nature of the bonding yields different results. For example graphite conducts electricity, but diamond won't. 

To add another wrinkle in this we can think of gaseous ionic or covalent molecules but in general being metallic is a "bulk" property. So we have to consider not only the bonding in the "molecule", but how "bonding" is distributed through the solid matrix of the sample. For example there are discrete water molecules in ice, but in a diamond there are no discrete carbon "molecules."