"Both Peter and John . . ." forms a plural, so the plural verb form "like" is correct. The two big hints that you have a plural are the words "both" and "and." "Both" means two, and "and" links individuals for a total of two.
Now, if Peter and John weren't fans of the sport, you may say, "Neither Peter nor John likes soccer." The words "neither" and "nor," which travel in pairs like "either" and "or," disconnect the two individuals, making them separate, distinct, and singular in the sentence structure.
You can double-check your verb choice in each sentence by substituting what is called a subjective personal pronoun, which is a pronoun that serves as the subject of a sentence. So, you would say, "They [Peter and John] like soccer" or "He [Peter or John] likes soccer."
You could also form the sentences, "Everyone likes soccer" or "Everybody likes soccer" (also singular forms, because "everyone" and "everybody" form singular units of every one and every body). Making such statements may be grammatically correct, but probably not accurate. At least one person out of myriad sports enthusiasts worldwide likely dislikes soccer altogether!