The difficulty with bacteria is that they may have components that are similar to host cells, so we must rely on drugs that target components unique to the bacteria (and these are limited). In addition, bacteria can develop resistance to these drugs at an alarming rate! The last problem that comes to mind is that the drugs that target pathogenic bacteria also kill our commensal bacteria, which makes us prone to infections.
Viruses are difficult to treat because they are primarily intracellular. Drugs must not only target viral components, but must be readily taken up by host cells WITHOUT causing damage to them