Welding requires training, and hiring a welder can be expensive, especially for fairly small projects, while using glue allows users to attach metal parts on their own. Glue doesn't damage the metal, so users can sometimes remove it and restore the metal to its previous state.
Welding is generally considered the best option for making structural connections between pieces of metal. It fuses the two pieces of metal together, creating a permanent connection. While welded spots might not be as strong as unwelded locations, tests have made welding predictable, so those who need a safe, durable connection might prefer welding to glue.
However, not all metals can be welded. Aircraft, for example, typically use relatively thin sheets of aluminum, which is not designed for welding. When a portion of aluminum needs to be replaced, the replacement sheet is typically glued into place using a strong epoxy and riveted into place if necessary. Glue doesn't threaten the integrity of other parts of the plane's structure.
Glue can also provide greater flexibility in some cases. Some glues can be dissolved using chemicals, allowing people to detach pieces of metal and reuse them for other projects. The non-permanent nature of glue makes it desirable for craft projects when welding would be too expensive or too destructive.