Fairly recently, but CRT (tube) TVs had been being phased out for years before that, helped by the fact that the price of flat-panel TVs began dropping in the early to mid-2000s, causing flat-panel HDTVs to be more desirable than their CRT HDTV counterparts.
In late 2006, Panasonic and Toshiba discontinued their CRT TVs. In early 2007, Sony discontinued their CRT TVs. In late 2007, Samsung and Sharp discontinued their CRT TVs. This meant that most CRT TVs began disappearing from shelves in stores around Christmas 2007 to early 2008.
But a few other brands (mostly second- and third-tier brands) such as Sanyo, RCA, and Dynex continued producing CRTs through 2008. As of late 2008, the only CRT TVs for sale at Best Buy were three models of the Dynex brand, Best Buy's in-house brand. As 2009 approached, they began phasing out their 20" and 24" models.
Target continued carrying CRT TVs of the brand names Memorex and TruTech (their in-house brand) until early 2009, when they began clearance of these models. Last time I saw a CRT TV for sale in a Target store was June 2009.
Walmart, Sears, and Kmart continued carrying TVs under the brand names Emerson, Sylvania, Haier, and Sansui for a few months later, but soon Funai Corporation, the company that makes TVs for Emerson, Sylvania, Philips, and Magnavox, decided to end CRT production. So CRT TVs disappeared from Sears and Kmart stores around late 2009.
As far as I know, Walmart does still stock two or three models of CRT standard-definition TVs under the brand names Sansui and Haier.
Note that all TVs produced from March 2007 on were required by law to have a digital tuner built in, so yes there are CRT TVs that are digital-ready. I own one myself. But some manufacturers didn't see the point, so they used this as an opportunity to stop making CRTs and focus on LCDs and/or plasmas instead.
So, if you're looking for an exact year, I'd say 2009, minus Walmart.