Sommer completed his apprenticeship at Basel, where he won the Swiss Super League on four consecutive occasions before transferring to Mönchengladbach in 2014.
Sommer made his debut for the Switzerland national team in 2012. He represented the nation at the 2014 FIFA World Cup and at UEFA Euro 2016.
Born in Morges, Vaud, Sommer played as a child in the youth teams of his local side FC Herrliberg and later of Concordia Basel. He moved to the Basel youth setup in 2003. He signed his first professional contract with Basel in 2005. He became the first-choice goalkeeper in the under-21 squad almost immediately, fending off opposition like Jayson Leutwiler and Orkan Avci, and was third-choice for the senior squad behind Franco Costanzo and Louis Crayton.
During the summer of 2007, Sommer signed a new contract lasting until 2011, and was loaned out to Liechtensteiner club Vaduz to gain first-team experience in an environment somewhat more competitive than the reserves in the Swiss 1. Liga. He was made the first-choice goalkeeper and played 33 matches over the course of the 2007–08 Swiss Challenge League season, playing a major part in Vaduz's promotion to the Swiss Super League. His loan deal was then extended to last until January 2009. He made his Super League debut for Vaduz on 20 July 2008 in the 2–1 away win against Luzern. Sommer was recalled to Basel on 7 January 2009 because the club's first-choice goalkeeper, Franco Costanzo, was injured.
Sommer made his Super League debut for Basel in a 3–2 defeat to Young Boys at the Stade de Suisse, Wankdorf, on 7 February 2009. He played six matches for Basel up until the end of the season. On 16 June, he joined Grasshopper on a one-season-long loan. During his season there, he played 33 league matches.
On 14 June 2010, Sommer signed a five-year contract with Basel. He served as second-choice goalkeeper behind Franco Costanzo. In March 2011, Basel announced it would not offer Costanzo a contract extension, therefore making Sommer the club's first-choice goalkeeper. Sommer played five Super League matches during the 2010–11 season and so was part of the championship-winning team.
Sommer made his UEFA Champions League debut on 14 September 2011 in the 2–1 home win against Oțelul Galați. He was first-choice goalkeeper in the 2011–12 season, after the end of which he won the double of the league and Swiss Cup.
At the end of the 2012–13 season, Sommer won the league title for the third consecutive time, having played in all 36 league matches. Basel also finished as runners-up in the Swiss Cup. In the 2012–13 UEFA Europa League, Basel advanced to the semi-finals, where they were matched against reigning Champions League holders Chelsea. Basel was eliminated 2–5 on aggregate.
At the end of the 2013–14 season, Sommer won the league championship with Basel. They also reached the final of the 2013–14 Swiss Cup, but were beaten 2–0 by Zürich after extra time. In the 2013–14 Champions League, Basel finished the group stage in third position to qualify for Europa League knockout phase, where they advanced as far as the quarter-finals. In their 2013–14 season, Basel played a total of 68 matches: 36 Swiss League fixtures, 6 Swiss Cup, 6 Champions League and 10 Europa League and 10 test matches. Sommer totaled 58 appearances: 35 League, 2 Cup, 10 Champions League and 6 Europa League, as well 5 in the test games.
On 10 March 2014, Sommer signed a five-year contract with German Bundesliga side Borussia Mönchengladbach, effective from 1 July. He was signed to replace Marc-André ter Stegen, who had joined Barcelona. In Sommer's first season at Mönchengladbach, 2014–15, Gladbach finished in third place in the Bundesliga, club's highest league finish since 1978. The club also managed to beat its record of consecutive matches without defeat, exceeding the record of 17 matches it had set during the 1970–71 season.
Sommer's debut came against FC 08 Homburg in the DFB-Pokal, where Gladbach won 3–1. Sommer played against VfB Stuttgart on the opening day in a 1–1 draw. He was famously lobbed from long range by teammate Christoph Kramer against Borussia Dortmund in a 1–0 defeat, but Gladbach went on to secure qualification for the UEFA Champions League with one match remaining. At the season's conclusion, Sommer was named Gladbach's player of the season.
The 2015–16 season began poorly: Gladbach lost its opening match 4–0 to Borussia Dortmund, with Sommer being blamed for the first goal. The club was reported to be in large trouble, and before its first Champions League match of the season, the club's players held crisis talks to discuss their problems. After losing 3–0 to Sevilla, Sommer was heavily criticized for his play. After a fifth-straight Bundesliga defeat, against rivals 1. FC Köln, coach Lucien Favre resigned. In contrast to the previous year, it was the worst start to a season Gladbach had ever suffered.
Under new interim boss André Schubert, the club's dramatically improved with four wins from four matches, resulting in Schubert's permanent appointment. Sommer was forced to sit out against VfL Wolfsburg due to a broken nose, having injured it against Manchester City in the Champions League. He was replaced for the Wolfsburg match by Tobias Sippel. Sommer eventually played in all of the remaining Bundesliga matches, with his performances leading to interest from Manchester City.
Sommer has represented Switzerland at various age levels, including at under-16, -17, -19 and -21 levels. He made his Swiss U-16s debut on 26 August 2003, but the match ended in a 0–5 defeat against the Germany. His U-17s debut was on 20 November 2003 in the 1–1 draw against England.
Sommer made his debut for the Swiss under-21s on 22 August 2007, as he was substituted in at half-time during the 2–1 away win against Belgium. He was goalkeeper and captain of the Swiss U-21 team which competed in the final tournament of the 2011 UEFA European Under-21 Championship, hosted by Denmark between 11 and 25 June 2011. The Swiss team reached the 2011 UEFA European Under-21 Championship Final on 25 June without conceding a goal, but lost 2–0 to Spain. This was Sommer's final match for the under-21s.
Sommer made his debut for the Swiss senior side on 30 May 2012 at the Swissporarena, Lucerne, in a 0–1 defeat against Romania in a friendly match. On 13 May, he was named in Switzerland's 23-man squad for the 2014 FIFA World Cup in Brazil.
Alongside Bundesliga colleagues Roman Bürki and Marwin Hitz, Sommer was one of three goalkeepers included in Switzerland's UEFA Euro 2016 squad. Sommer was Switzerland's first-choice goalkeeper, playing all four of the nation's matches. Sommer was unable to prevent Switzerland being eliminated by Poland in the round of 16, losing 5–4 on penalties after a 1–1 draw.Vaduz
Swiss Challenge League: 2007–08
Liechtenstein Football Cup: 2007–08, 2008–09
Swiss Super League: 2010–11, 2011–12, 2012–13, 2013–14
Swiss Cup: 2011–12
UEFA European Under-21 Championship Runner-up: 2011
UEFA European Under-21 Championship Team of the Tournament: 2011