It's extremely rare, but some players, GMs, or entire groups enjoy it.
I've played D&D for almost fifteen years, and until my current group, we never used props or costumes. This is despite the fact that my groups over the years have been made up largely of theater students, Renaissance Festival participants, cosplayers, and other types who enjoy dressing up and have costumes that would be perfect for the game.
In my current group, however, one player enjoys dressing for the part, and has several costume pieces that he wears to get in character. His enthusiasm prompted a second player to start wearing a trinket representing her character, and as of now we have three people who use props or costumes to some degree. I've actually started to consider, as GM, bringing in or wearing certain costume pieces to represent when I'm playing different NPCs. (I haven't yet due to practical considerations, but it would be fun to do if I can overcome the logistical hurdles.)
In short, the use of costumes and props, while extremely rare, is entirely a personal preference. It depends on the group you're gaming with and what they find interesting, fun, or helpful for roleplaying.
The reason costumes are often used in movies and TV shows depicting roleplayers has to do with how visual media uses visual shorthand to get ideas across quickly to its viewers. Think how the stereotypical "nerd" is usually depicted as skinny, hunched, and wearing thick glasses; how the stereotypical "jock" is usually depicted wearing a sports jersey; how the mechanic usually wears overalls, has grease stains on their face/hands, and carries a wrench; how the magic user typically wears robes and carries a staff or wand. These are cultural stereotypes which directors and crew can tap into to quickly convey the essence of a character, without having to spend a great deal of time explaining to the audience that yes, in fact, the burly guy who drives a Jeep is actually a huge geek who can take apart a piece of hardware or software in five minutes flat.
Since the stereotypical public view of tabletop gamers is inextricably tied up with LARPers in non-gamers' minds, and since a typical tabletop gaming session isn't immediately visually different to layfolk than someone playing a board game or doing some other non-gaming activity, visual media uses cheap costume pieces to tell the audience that a character is One Of Those Role-Play Types.