Well, Beethoven and Shostakovich probably wrote the single best string quartets of all time, not to say there aren't many other highly valuable works out there. It really is one of the richest areas of classical music, in terms of sheer amount of repertoire. Let's see...as regards twentieth-century music, I would recommend taking a look at the following:
-Tonal (more or less):
---Shostakovich - Quartets Nos.9, 10, 13, 15 (or any others
)
---Villa-Lobos - Quartets Nos.5, 6, 7
---Martinu - any quartet except No.1, probably
---Ravel - Quartet (barely counts as 20th-century, still great though)
-Not-so-tonal or outright atonal:
---Bartok - Quartets Nos.2, 4, 5
---Britten - Quartet No.3
---Carter - Quartet No.2 (heck, probably all of them)
---Berio - Quartet No.3 ('Notturno')
---Ligeti - Quartet No.1
---Stravinsky - 3 Pieces for String Quartet (short but important and highly interesting)
I'm sure everyone will yell at me for leaving out other major composers (Berg, Holmboe, Revueltas, Milhaud, Malipiero, Prokofiev, Cage, Tippett, Webern, Maconchy, Xenakis, ...), but I think this is a fair survey of the good stuff written in the last century. Admittedly it doesn't give the absolute best representation, but it should do all right for an introduction at least.
However, speaking as a composer of a string quartet (with a second in the works, plus a suite) myself, I would say that you should not feel as if you have all these greats peering over your shoulder. I would pick maybe one from each category to look at, at most, along with a Beethoven (Op.18 are great for analysis). How you approach the medium should be largely determined by your own personal style, not the works you select to examine.