It comes down to a combination of their inherent stat distribution, and the pool of moves they have access to.
Sweepers have high Attack, or Special Attack, or a mix of both, and have access to high damage moves. They usually also have high speed, but sometimes they have really really low speed (for Trick Room), or have high health and some draining moves in order to take a few hits. Examples would be Vikavolt, Gyarados, Barraskewda, and similar.
Supports tend to have moderate innate stats, and access to moves with beneficial utility effects, either to augment the team or heal allies, or to hinder enemies or apply status to them. Examples would be a Dual Screener (Reflect and Light Screen), or a Trick Room setter, or a Wish passer (high health, with the move Wish and a switching move), or a Status Spreader (1 or more moves that apply a status condition, such as Toxic or Scald). Now with Sword and Shield, there are some new moves that may prove to be very powerful in double and triple battles, such as Life's Dew (heal all allies by 25%), or Decorate (raises the target's Sp Attack).
Walls are a little more specialized. They usually have high Health, and have either very high Defense or very high Sp Defence, but not both. They also have a relevant attack stat. They are used as a counter to Sweepers, as they take little damage from the corresponding kind of Sweeper (physical or special). Sometimes the physical Walls have access to moves that specifically punish moves that make contact with the target, such as Baneful Bunker (poisons foes who make contact) or Spiky Shield (damages foes who make contact). The extreme example of a physical contact punishment Wall would be Ferrothorn, with its ability Iron Barbs. Other Walls would include Skarmory, Ninetails, Cofagrigus (and, now Runirgus), Lapras, etc.