Coffee contains caffeine, which is a stimulant that can boost mood and energy levels. The caffeine in coffee works by increasing the levels of certain chemicals in the brain, such as dopamine and norepinephrine, which can lead to feelings of happiness and euphoria.