Clarithromycin isn't the treatment of choice for any STD. However, it would effectively prevent most cases of gonorrhea, chlamydia, syphilis, or nongonococcal urethritis (NGU). But not all.
Antibiotics, including clarithromycin, have no effect on viruses and therefore cannot prevent herpes, HPV, or HIV.