Bathroom sink odor occurs. It should not be a surprise. The sink is draining away grey water, after all. Sewage. .
The bathroom sink carries bacteria from washed hands, cleaning stains from clothing and brushing teeth. Because the drain assembly allows for air to get to the moistened piping below the mouth of the drain, bacteria, mold and mildew settle into the drain assembly. With the bacteria that gets washed down the drain, the drain assembly is a natural sort of petri dish. With use, mold, mildew and bacterial growth continue and sink odor is what alarms us to a need to investigate the source.
In the diagram above, notice the "u" shaped trap assembly. From the trap (water line) line down, we experience no unpleasant odor. This is due to the fact that the trap is doing its job when the trap is full with water. Water in the trap prevents sewer gas from entering the home.
Above the trap, there is usually about 18" of pipe that is open to air. This is the tail piece and the pop-up assembly. Here is where every home's built in petri dish resides.
In order to treat this part of the bathroom sink drain and inhibit odor causing bacteria from growing, the homeowner must be able to get an anti-microbial to the drain assembly and the overflow. (The overflow is locate just below the sink rim. Normally on the front or back of the basin).
One of the anti-microbial solutions that can be found on the shelves at The Home Depot is a product called Micro Ban found in a line of cleaners under the brand name, "Legend". The use of bleach kills almost any type of bacteria. However, mold only spores and becomes air born. This means, if you decide to ignore good advice and use bleach to kill mold, you may cause it to spore and lodge wherever it lands. That could be in your lungs or someone else's.
Use a spray bottle to get the Micro Ban cleaner into the overflow. Dowse the overflow generously, as the flow will develop and then only trail in one part of the overflow conductor. Then poor about five ounces of micro ban into the drain assembly of the sink. This should inundate the piping and allow for a well treated drain line. There is only two other methods of getting an anti-microbial to the overflow and the drain.
If your bathroom sinks drain pipe has a flush mounted (Dandy) cleanout in line, you could purchase an inflatable test ball to stop water in the line. Then fill the line with an antimicrobial up to the rim of the sink.
You could also remove the sink from the wall....(Turn the water to the sink off. Remove the trap and the supply tubes) now take the sink off the wall and soak it in an anti-microbial.
A second product recommended by Anchor Sewer and Drain Cleaning is, RX-66 Bio Enzyme Digester, by Airx Laboratories.
About the trap. The trap is supposed to be filled with water in order to bar gases coming from the sewer and entering the dwelling. However, if the trap does not have water in it, naturally, gas will emanate from the drain. If your trap does not hold water, call a sewer and drain cleaner or a plumber to investigate.