With his Texas twang, Sonny Curtis sounds more like Foghorn Leghorn than the dulcet voice behind the Mary Tyler Moore Show theme (you know: ''Who can turn the world on with her smile?''). But the 53-year-old singer-songwriter is not only the unlikely author of Mary's Minneapolis melody but more recently has penned the down-home ditty for CBS' popular Evening Shade. And though Curtis' name may be just a flash at the end of TV shows (''That Mary Tyler Moore credit was so small you couldn't tell if it said Sonny Curtis or No Smoking''), his musical pedigree is impeccable: He played guitar behind Buddy Holly in the late 1950s, first with the Three Tunes and then with the Crickets. Curtis still remembers the first time he met the rock & roll legend: ''It was a real sandstormy night and we didn't waste time with small talk we just got out our guitars and started pickin'.'' The Crickets continued touring even after Holly's 1959 death in a plane crash, and Curtis played with them on and off until 1983. Though he didn't pen any of Holly's classics, Curtis did write or cowrite several songs that became hits for other pop artists the Everly Brothers' ''Walk Right Back'' in 1961, Bobby Fuller's ''I Fought the Law'' in 1966, and Leo Sayer's ''More Than I Can Say'' in 1980. He's also written his share of jingles (''Cars, hamburgers, airlines, you name it'') and the theme song to another TV show, a flop 1977 sitcom starring Ned Beatty called Szysznyk (''I think it lasted 15 minutes''). Today, Curtis, who lives on a farm west of Nashville, relies on his 15-year-old daughter, Sarah, to keep him up on pop music. (''I'm at the age where the thing you'll find me listening to is All Things Considered.'') His present style is a little more country than rock & roll; he occasionally plays in the U.S., and this month he'll be opening for Ronnie Milsap in New York City. This fall he'll be touring in Europe, as he does a few months each year. Looks like he's made it after all.