We tend to smell like the food we eat and the liquids we drink — what we eat and drink is digested in our stomachs and intestines, and the chemicals in these foods and liquids are passed on throughout our bodies through our bloodstreams. The stronger and more pungent the smell of the food or liquid, the stronger and more pungent our breath and body odor will be. Such odors will last until the food and liquid is completely processed and their remnants pass out of our bodies. The foods and liquids that cause the worst odors are those that include the highest sulfur compounds, such as coffee.
The caffeine in coffee can dry out your mouth by slowing saliva production, which can lead to bad breath. A lack of saliva causes bad breath for a couple of reasons. One is that saliva helps kill bacteria found in your mouth, and the other is that saliva helps you digest food particles caught in your teeth and other areas of your mouth. If there is no longer enough saliva in your mouth because of caffeine, then the bacteria that cause bad breath will grow out of control. Similarly, if your mouth isn't producing enough saliva to digest the food particles caught in your teeth, bacteria will begin to break down those food particles, giving off bad odors in the process. Coffee is worse than usual in this regard because of its sulfurous content, which certain bad breath-causing bacteria can break down to produce odor.
One final reason that drinking coffee can give you bad breath is simply that coffee has a very strong odor that smells worse than it tastes. Combined with the other bad-smelling odors, this can result in terrible smelling breath. It is also possible that other compounds such as milk in the coffee you drink contribute to the problem.