There is practically no scientific evidence that baking soda can act in that manner.
Evidence for baking soda for odor removal
When searching Google Scholar for [sodium bicarbonate odor], almost all hits are for patents. When they are turned off, there are almost no relevant results left. The only straightforward application is in a paper from 1946, which is very lax by today's standards: Lamb, John Henderson. "Sodium bicarbonate: an excellent deodorant." Journal of Investigative Dermatology 7.3 (1946): 131-133. It found that, when people smear baking soda under their armpits, the smell of sweat is reduced. The results were measured by self-reporting and anecdotal evidence ("Any student who had
failed to use the preparation on the day of examination was usually easily detected by both the instructor and the students by the olfactory sense"). No research was done on the mechanism of action, but the author speculates that the sodium bicarbonate reacts with certain fatty acids which are secreted in human sweat. The other suggested mechanism is that it makes the armpits unhospitable for the kinds of bacteria that make human sweat smell unpleasant.
Other hits on that query don't even focus on the sodium bicarbonate per se, for example a paper on the odor of waste treatment facility shortly mentions a not very successful attempt to change the pH of a waste reactor, whose goal was to ensure the right populations of bacteria are present (https://doi.org/10.1002/ep.670150311). It doesn't discuss any direct link between baking soda and smell.
As opposed to this situation, a different odor absorber - charcoal - enjoys a healthy amount of research into its deodorizing properties, as evidenced by a Google Scholar query [charcoal odor]. Since soda is cheaper than charcoal, one would expect that people who work with odorous processes on industrial scale would have looked into soda if it had much promise.
Evidence for the original source of the claim's popularity
At the same time, it is widely accepted that the information that "soda helps fight odor in refrigerators" was widespread by one of the most successful marketing campaigns of the 20th century. It is now serving as a textbook example, being mentioned in overview articles like this one. There is an interesting extended version from Clayton Christensen (Christensen, Clayton M., Scott Cook, and Taddy Hall. "Marketing malpractice." Harvard business review 83.12 (2005): 74-83.)
Consider how Church & Dwight used this strategy to grow its baking soda business. The company has produced Arm & Hammer baking soda since the 1860s; its iconic yellow box and Vulcan’s hammer-hefting arm have become enduring visual cues for “the standard of purity.” In the late 1960s, market research director Barry Goldblatt tells us, management began observational research to understand the diverse circumstances in which consumers found themselves with a job to do where Arm & Hammer could be hired to help. They found a few consumers adding the product to laundry detergent, a few others mixing it into toothpaste, some sprinkling it on the carpet, and still others placing open boxes in the refrigerator. There was a plethora of jobs out there needing to get done, but most customers did not know that they could hire Arm & Hammer baking soda for these cleaning and fresh ening jobs. The single product just wasn’t giving customers the guidance they needed, given the many jobs it could be hired to do.
And a book to which I sadly don't have full access gives us some information on the size of the marketing effect (How to Innovate in Marketing (Collection) By Monique Reece, Michael Tasner, Tony Davila, Marc Epstein, Robert Shelton, Larry Light, Joan Kiddon)
Arm and Hammer repositioned baking soda as a cleanser and refrigerator deodorizer. A year later, 33 million refrigerators in the U.S. had
Now this is no straight evidence for a missing effect from baking soda. But it is a very good argument that the popularity of baking soda as a refrigerator deodorant happened independently of its possible effectiveness. Apparently, before the marketing campaign, only a few people ever considered such use, so it was not a widely known remedy the way soap has been a widely known remedy for dirt.
To sum it up, while there is no scientific evidence for or against the effectiveness of baking soda, we have
- a suspicious lack of evidence that it works
- suggested mechanisms of action which limit its effects to a certain category of odor sources (either chemical compounds which react with baking soda to something odorfree, or bacteria which don't live in a solution whose pH has been changed through baking soda) AND require the soda to be mixed with the smelly substance as opposed to sitting in the vicinity
- a well documented history of how the claim spread, which is not dependent on real effectiveness
- the chemist's opinion in Scott Hamilton's answer that it doesn't really work
So in that case, I am very strongly leaning towards the conclusion that the whole thing is a myth.