As a slow, defensive tank, Swampert often finds itself in a defensive pivot role in most teams. While it does face competition from Gastrodon and Quagsire, both of whom have Recover, Swampert can use its 110 Attack stat to great effect, taking hits from common Pokemon and softening them up or simply taking them out.
Singles sets:
Choice Band

@ Choice Band
Adamant Nature
252 HP / 252 Atk / 6 Def
Aqua Tail
Earthquake
Ice Punch/Avalanche
Hammer Arm/Superpower
This set aims to simply hit hard and take hits, and can check dangerous Pokemon like Excadrill, Tyranitar, and assorted Dragon-Types. Aqua Tail is the preferred move due to higher Base Power, but if 90% accuracy puts you off, Waterfall is always an option. Earthquake is simply for strong STAB, while Ice Punch and Hammer Arm are there for coverage. Stone Edge can be put to good use in either of the last two slots, hitting Flying types harder than Ice Punch, though it doesn't offer much else.
Doubles sets
Wide Guard Support

@ Sirtus Berry / Rindo Berry / Leftovers
Relaxed Nature
252 HP / 252 Atk / 6 SpD
Wide Guard
Waterfall
Earthquake
Hammer Arm/Ice Beam
Swampert can make use of Wide Guard by protecting its partners from various spread moves like Heat Wave, Earthquake and Rock Slide while sponging other non-Grass hits easily. Waterfall is preferred here, especially if you run Trick Room, though Aqua Tail can prove useful with higher Base Power. Earthquake is a useful spread move that can take out Electric-types that threaten your Flying partner, but if you don't like the fact that it can hit your Pokemon, you can opt for another supportive move like Yawn, Protect, or even a ChestoRest combination to keep Swampert in top form. The last slot is purely for coverage, and your choice should reflect what your team needs covered. Muddy Water is a cool spread move that has a chance of lowering accuracy, and can be used over your physical Water move, though the drop in power is very noticeable. Blizzard is another spread move that can be used to great effect in Hail teams who enjoy the protection of Wide Guard against their mortal enemies; Heat Wave and Rock Slide. It might be tempting to pour all of Swampert's other EVs into its Defenses, but extra Defense doesn't really help as much as 2HKOing Metagross with Earthquake, 2HKOing Thundurus and Tornadus with Aqua Tail (OHKO in the rain) and OHKOing many frail-ish Pokemon is.
Other notes:
Swampert needs a teammate or two that can take out dangerous Grass-types. Thundurus with Hidden Power Ice or Flying greatly enjoys having Tyranitar and Excadrill out of its hair, and can switch into Grass moves Swampert attracts. Fire and Ghost-types also enjoy having said Pokemon gone, and can support Swampert with Will-O-Wisp as well as scaring off Grass-types. In Doubles, Thundurus can perform a 'ZapChomp' combination with Discharge and Earthquake, which is more difficult to deal with considering Wide Guard blocks Rock Slide, the main Thundurus check.
-more other notes coming soon-