Any of them CAN,
most of the time metals don't, except in compound ions like MnO4-
noble gases don't, but xenon can, only with fluorine, though.
non-metals always CAN, but don't if they are in common ionic compounds (metal+non-metal)
Carbon nearly always will.
How deep you need to know this depends what level you're at.
Marv: what about oxygen and chlorine and carbon?
It may comes as surprise, but ALL elements form covalent bonds. There are some folks who dwell under a misconception that there are two distinctly different kinds of bonds: ionic and covalent. In reality bonds lie along a continuum which varies by polarity from 100% covalent to bonds which have a high ionic character.
All chemical bonding involves the interaction of electrons. The electrons of one atom are not only attracted to its own nucleus, but also to the nuclei of the atoms around it. In addition, there are regions between atoms where there is a high probability of finding electrons, the orbitals. Since the bonding electrons are shared by two (or more) atoms then technically, all bonds are covalent.
Surprisingly, there are no 100% ionic bonds. We say that all bonds are covalent, but by varying degrees.
The bonding electrons are not all attracted to nuclei with the same force. The more electronegative elements have a greater "pull" on the shared electrons. This makes for polar bonds. The more polar is a bond, the more it acts like a hypothetical ionic bond. In order to rank how polar a covalent bond is, we use the "percent ionic character" (PIC). The PIC can be computed* based on the electronegativity difference between the two bonding atoms.
It turns out that only the alkali metals bonded to a few of the most electronegative elements act anything like ionic bonds. The most ionic of bonds is the bond between cesium and fluorine and that one as a PIC of 92% ionic character. A bond like Na-Cl in table salt as about 70 percent ionic character. There are many other metal-nonmetal bonds which are more covalent than they are ionic.
Unfortunately, some high school and even college teachers oversimplify bond types to the point that the student has no real understanding of bonding. This is real shame and a pet peeve of mine. I've been teaching HS chemistry for nearly 40 years and I believe that HS students can "handle the truth".
==== Follow up ====
As you can see by some of the other answers, the common misconceptions are alive and well.
Most nonmetals, except for the Noble Gases. Covalent bonds only occur between nonmetals, so metals won't be covalently bonded.
Fluorine, Bromine, Hydrogen, Iodine, Nitrogen. You can remember it by the pneumonic: Fat Brian Has Inky Nails!