Biography
In Real Life, a common means of transportation in urban environments is to take a taxicab. As a result the taxi driver and their cab make a cameo in many stories, are a plot point in several of them, and in some may be the whole point of the story.
Like bartenders and barbers, part of a taxi driver's job is to make small talk with customers, so having a character take a cab can be used as an opportunity for the character to chit chat (and deliver some Exposition). Alternatively, the cab driver may make an innocuous remark about the news or local events that jogs the protagonist's mind and nudges them towards figuring out a mystery.
Since cab drivers are the protagonist's first point of contact when they arrive in a new town, the cab driver may offer some prophetic words of warning about a local Big Bad or a risky section of town. Conversely, a sleazy driver may offer to take the fare to a brothel for a good time.
Cab drivers are an anonymous part of the streetscape, which means that a cab driver character can easily observe the city's goings-on without being noticed. Detectives in police procedurals may ask cabbies if they've noticed anything unusual. Cab drivers in a murder mystery may be the last person to see the victim alive if the victim took a taxi to their destination, so the will be interviewed by police. Sometimes, the cab driver may be the suspect...or even the killer (making use of their ubiquitous presence on the streets to blend into the scenery and pass unnoticed by witnesses).
Cab driving is a lonely job with long hours and without room to advance, which may make drivers world-weary and bitter (Taxi Driver being a prototypical example), although some deal with it by taking on a philosophical perspective, which means they may dispense pearls of wisdom to the hero.
Cab drivers range from friendly and wholesome (especially in a nostalgia-tinged Everytown, America setting), funny (in films where the driver is a source of Comic Relief—often overlapping with Funny Foreigner in American works, as a lot of taxi drivers in the US are immigrants), sleazy (in a Film Noir, where they may have a Mysterious Past or a Dark and Troubled Past), or downright sinister, like the Deranged Taxi Driver in a Horror film. Sinister cabbies may drive a fake taxi with a false registration number, so that they can use their cab to pick up victims without being traced.
Especially likely to be seen in New York City or its fictional equivalents. A New York taxi in a movie or TV series is likely to be an old-fashioned '50s-style Checker model (the last of these was retired from Real Life NYC service in 1999, though the motif held). In London, black cabs are often used. Cabs exist in futuristic ScienceFiction settings too, such as Bruce Willis' flying taxi in The Fifth Element.
Related to Not My Driver, Follow That Car, Failing a Taxi, and in the UK Driver of a Black Cab. Emergency Taxi is when a character urgently needs a cab, and moments after they yell "Taxi!" and raise their hand, one screeches to a halt.