Writers frequently ask whether they can mention brand name products and services in their fiction. The answer is "yes," provided that you take some common sense precautions. Indeed, if it were unlawful to include brand names in fiction, countless product references in Bret Easton Ellis's novel Glamorama would have been expurgated, and David Foster Wallace could never have described in Infinite Jest an alternative present where large corporations purchase naming rights to the calendar years (e.g., "Year of the Whopper," "Year of the Trial-Size Dove Bar," "Year of the Perdue Wonderchicken," "Year of the Depend Adult Undergarment," and "Year of Glad").
The four areas of law to consider in connection with brand names are "trademark infringement," "trademark dilution," "trademark tarnishment,"and "defamation."
A classic case of "trademark infringement" is the unauthorized use of a name in a way that creates a likelihood of confusion as to the origin of the goods or services. For example, if you were the manufacturer of aluminum foil and decided to name your foil "Glad," the Glad Products Company, manufacturers of Glad plastic wrap and Glad trash bags would likely think your use of the term is an infringement. Even if Glad Products Company doesn't manufacture aluminum foil, aluminum foil is sufficiently close to plastic wrap to create a likelihood that some shoppers would be confused as to whether your aluminum foil is manufactured, licensed, or endorsed by the makers of Glad plastic wrap. Keeping this principle in mind, it is evident why fiction rarely gives rise to trademark claims. When David Foster Wallace imagines a world in which Glad Products has bought naming rights to the year that would otherwise have been called 2010 (under the old number/naming system), he isn't using "Glad" to sell his own confusingly similar goods. He is, in fact, using "Glad" to refer to Glad Products' own goods. Trademark lawyers call this "nominative fair use," and it does not constitute infringement.
"Trademark dilution" is a somewhat different legal theory that gives owners of famous brand names a legal right to prohibit others from using those names in a manner that would make them less "distinctive," less able to identify and distinguish the owners' goods or services. For example, trademark owners have fits when writers of fiction or non-fiction use their brand names as generic terms for products or services. The Xerox Corporation doesn't like writers or the public to speak of "xeroxing" documents, instead of photocopying them; Johnson & Johnson doesn't want their Band-Aid brand to become the generic term for bandages; and Google complains about the use of the term "googling" instead of using the Google brand search engine for "searching" the Internet. Once in a while, a writer will receive a lawyer's letter from a company urging him/her not to genericize the company's brand names. Usually, the dispute goes no farther than that. Writers can avoid even mild reprimands of this sort by respectfully capitalizing brand names.
"Defamation" and "tarnishment" are the areas where there could, in rare instances, be greater cause for concern. If, for example, you falsely depict a brand name product as being dangerous or defective, a manufacturer could be heard to complain. Ultimately, the manufacturer should have to prove that some readers actually understood the disparaging depiction to be a statement of fact, not fiction, but there is seldom an artistic necessity to test that line.
Trademark "tarnishment" is a kind of hybrid between trademark dilution and defamation. Such claims arise when a non-owner uses another's trademark in highly disparaging or offensive contexts. The best-known tarnishment case was a successful claim by the Dallas Cowboy Cheerleaders (who owned a registered trademark) against the makers of the pornographic movie, Debbie Does Dallas, in which the actresses were depicted in the cheerleaders' trademarked uniforms, to the extent that they were depicted in anything at all. The Appeals Court's famous (at least to trademark lawyers) decision is here. Notwithstanding the Debbie Does Dallas decision, some uses of trademarks in ways that the owner regard as highly disparaging may be successfully defended as parody, as described in this online article by Leslie Lott and Brett Hutton.
A sensible precaution: if you are depicting brand name products or companies in an unsavory light in your novel or short story, it is often prudent to invent a fictional brand or a fictional company. If there is a compelling artistic reason to use real products and real companies in contexts that arguably disparage them, it is wise to seek advice, prior to publication, from your publisher's attorney -- or an attorney of your own -- on how best to minimize the legal risks.
The movie industry has always been exceedingly cautious about the use of brand names and the names of real people in films. For example, the director Danny Boyle, told the press that he caused Mercedes Benz logos to be digitally removed from cars in his film Slum Dog Millionaire when the manufacturer objected to the depiction of its cars in Bombay slum settings. (It is difficult to imagine a successful claim arising from such innocuous use, but movie studios are unwilling to run any legal risks that could conceivably lead to an injunction interfering with timely distribution of their films.) More frequently, of course, companies pay the movie studios for product placement. (There are even isolated isolated reports of paid product placement in novels.) I can only speculate that the movie industry's obsession with the depiction of brands in fictional works is the source of the largely unfounded concerns about the depiction of brand names in written fiction.
Again, the use brand names in fiction is not a sleep-depriving issue. It would be obsessive (and stylistically unpalatable) to use the R-in-a-circle symbol or the TM symbol every time you refer to a brand name in your text. And, as long as you do not write falsely and disparagingly about real brands and the companies who manufacture them, you are unlikely ever to run into a problem.