Schwegler began his career with FC Luzern. In summer 2005, he joined Young Boys. After just one year with Young Boys he signed with Bayer Leverkusen. On 18 July 2009, after three years with the "Werksclub", Schwegler signed with Eintracht Frankfurt. Schwegler, wearing the captain's armband for three years at Frankfurt, left the club in the 2014 summer transfer to join fellow Bundesliga side TSG Hoffenheim on a three-year deal.
He is the brother of Christian Schwegler.