In last month's issue of Q magazine, old-fashioned indie values found an unlikely champion. "I don't want my name anywhere near another brand," declared Adele. "I don't wanna be tainted, or haunted, and I don't wanna sell out in any way. I think it's shameful."

Coming from a 23-year-old in 2011, let alone the biggest pop star in Britain, these words seemed quaintly archaic. Twenty years ago, "sellout" was the most damning insult in rock. If you licensed a song to an advert you were, in the words of Bill Hicks's memorable routine, "off the artistic roll call forever. You're another whore at the capitalist gang bang … Everything you say is suspect and every word that comes out of your mouth is now like a turd falling into my drink."

But the days of the hard line are gone. As a writer for The Onion AV Club put it recently: "Most of us are past the point where 'selling out' is something that really matters any more." The summer festival season is a sea of brands. Corporations sponsor not just tours but, increasingly, albums (Groove Armada and Bacardi) and videos (Faithless and Fiat). TV shows and adverts are rife with songs from credible artists. Explains Geoff Travis, founder of the Rough Trade label: "A major source of income for all record companies, musicians and publishers now is having your music on ads, on TV and in films."

So is there any space in music left for arguments about integrity or are we seeing the last days of the sellout? Ian Parton of Brighton's the Go! Team says he started out in 2004 with "zero tolerance" for adverts, convinced "music should be a haven from the world of branding and corporations". Now he approves a handful with reluctance and rejects many more. "Often the reaction when you tell people that you have turned something down is: 'You stupid twat. What did you do that for?' It's quite thankless. It's so easy to say yes. It doesn't seem to trouble people any more. Hey, there's this band on a bank advert – say something! But nobody ever does."

Until the late 70s, "selling out" retained the same meaning it had since its origins in US political slang a century earlier: "To betray a person or cause for gain." The overlap between art and commerce was an occasion for goofy humour (1967's The Who Sell Out) rather than angst. Selling out only became a seriously divisive issue with the advent of punk and independent labels. Setting itself in opposition to a dominant culture that celebrated ostentatious materialism, 80s indie prided itself on its disregard for mammon. "There was this thread of oppositional politics," says Geoff Travis. "You're trying to make your art in opposition to what you perceive as the decay of mainstream culture so you don't want to participate in that."

In the middle of the 80s, the burning issue was whether to sign to a major label. The notoriously purist Tim Yohannan, editor of the US punk fanzine Maximum Rock'n'Roll scorned anyone who shacked up with a major as "collaborators". But enough bands continued to make great records after the transition, according to Craig Marks, who co-ran the influential US indie Homestead Records in the 80s and edited Spin magazine in the 90s: "When Sonic Youth signed to Geffen [in 1989] the cries of 'You're on a major, you're a sellout,' essentially ceased. People had to focus on different things."

The new battleground was adverts. In 1988, Neil Young mocked the practice in This Note's for You: "Ain't singin' for Pepsi/ Ain't singin' for Coke/ I don't sing for nobody/ Makes me look like a joke." But indie never faced such a dilemma – Coca-Cola weren't exactly in hot pursuit of Dinosaur Jr or Foetus in 1985. Marks says that at Homestead, "I'm not sure we could have sold out if we'd wanted to." Travis agrees: "It was a very different culture then. If someone had been clever enough to give the Smiths half a million pounds to do an ad, I would have been very interested to see what they would have said."

The soul-searching began when Nirvana's Nevermind brought alt-rock crashing into the mainstream and the tropes of an underground culture were quickly appropriated by Hollywood, fashion labels and brands. While Kurt Cobain and Pearl Jam's Eddie Vedder agonised over how to maintain their integrity in a big-money world, Spin magazine added a "Biggest Sellout" category to its annual readers' poll. "Nirvana were frozen in time as the paradigm of a certain value system," says Marks. "If you were Mötley Crüe in values and Nirvana in sound, that was crime No 1."

But a lot has changed in the last 20 years. Indie's oppositional identity is so diluted that it no longer has any intrinsic political principles to abandon. Young bands might wonder exactly what principle they're defending now they've seen icons such as Bob Dylan (Victoria's Secret), Iggy Pop (Swiftcover), Led Zeppelin (Cadillac) or the estate of the sainted Nick Drake (Volkswagen) take the advertising dollar, and the buccaneering pragmatism of hip-hop has removed even more of the stigma.

Meanwhile, music supervisors on TV shows have become hipper – careers have been made off the back of The OC or Grey's Anatomy – and brands are getting cannier and more constructive. Converse has set up a Brooklyn recording studio for new bands and bailed out London's 100 Club; the Red Bull Music Academy fosters leftfield music and debate; Bacardi and Mountain Dew have their own record labels, with seemingly fewer strings than the majors. A frequent comparison is with the patrons who have allowed classical composers to thrive.

Most importantly, plunging record sales and marketing budgets mean musicians are expected to learn how to hustle. Ohio blues-rock duo the Black Keys are prolific syncers, with numerous adverts and TV shows on their CV. They maintain it's a valid way of raising income and exposure. "We have more people coming to our shows and buying our records," frontman Dan Auerbach told me last year. "I think it's like having a song on the radio. As long as your art is pure, who cares where it is?"

Theirs is a common solution for bands who start out with tiny budgets. Geoff Travis says he has airplay-deprived bands on Rough Trade who would relish the money and exposure a well-chosen advert could bring. One Rough Trade band, Texas's Strange Boys, recently declined £20,000 from a Norwegian phone provider. "We have to accept that decision," says Travis, "but I think a year later they would probably accept it because they'd understand the economics. I'm not saying every band has a price, because that's really not the case, but for the Strange Boys £20,000 could make all the difference."

Such pressures aren't limited to new artists. John Lydon claims he needed his pay cheque from hawking Country Life butter to fund Public Image Ltd's reunion. Even Pearl Jam, grunge's most dogged holdouts, finally gave in and partnered with Target and Verizon to promote 2009's Backspacer album. Spurning brands has become a luxury restricted to artists (such as Radiohead or, indeed, Adele) whose profile and record sales are in rude health. Recently Arcade Fire's Win Butler told me why his band snubbed commercials: "I don't want people thinking about a Toyota when they hear Keep the Car Running. It's sad when you hear music and it makes you think of a product." But he added: "We've been lucky. We can make those decisions based on artistic reasons and not the financial side. You gotta do what you gotta do."

And how many of us are in any position to disapprove? By downloading music for free, the average music fan is both morally tainted and more aware of industry economics, and therefore more forgiving of the newcomer with a tour to fund or the fading legend with a pension pot to fill. "People who are getting music for free off the internet have a hard time arguing against bands selling their songs to commercials," Marks says. "I think that requires a moral jujitsu that most people can't perform."

Yet has the old tyranny of the purist given way to the tyranny of the realist? Explaining the use of his song Riot Rhythm in a Honda commercial, Derek Miller of Brooklyn duo Sleigh Bells said: "It's almost pretentious to avoid the opportunity, especially in this climate." Pretentious? Really? Whenever you extrapolate a general lesson from your personal decision, you're on thin ice.

The public still has a sense of when something smells bad. "It's an aesthetic judgment about how they sold out rather than a political one about the fact they sold out," Marks says:. Just ask poor old Duffy (a Rough Trade signing), who shot herself in the foot with a widely derided Diet Coke campaign two years ago. Or Iggy Pop: fans could have stomached The Passenger soundtracking a Swiftcover ad, but not the dispiriting sight of the forefather of punk rock discussing car insurance with a puppet of himself. "That one hurt the most," says Ian Parton. "Something had changed when it had become acceptable for a punk legend to do this shit."

Even an economic realist might feel a twinge of loss, the sadness of having a fond memory tainted, when Bright Eyes shills for Halifax, or the Cure for Kodak. And with good reason. It is precisely the residual countercultural capital of certain music that brands are exploiting: a song is not just a song. "Indie-inflected music serves as a kind of Trojan horse," adman Josh Rabinowitz told the New York Times last year. "Consumers feel they are discovering something that they believe to be cool and gaining admittance to a more refined social clique." And though brands like to pitch themselves as artist-friendly, they are not above responding to licensing refusals by the likes of the Go! Team, Fleet Foxes or Sigur Rós by commissioning blatant imitations of their sound.

Travis, for one, admires those who decide to swim against the commercial tide, citing Super Furry Animals's rejection of at least £1m from Coca-Cola because of the way the company treated South American workers. "I hugely respect anyone who has principles and has a rationale about why they will or won't do things. And I think that sense informs their music, usually for the better. I don't want everything to be serious and po-faced but I certainly wish there was a lot more debate and opposition."

In the past, the idea of selling out could be too unyielding and punitive. But if we say that there is no room for it any more then we're also saying there is no dignity in saying no, and no principle more powerful than the logic of the market. We can live without the scolds but we should cherish the refuseniks, because only when the last one has said yes will we be able to realise exactly what has been sold and to calculate whether the price was worth it.