To begin with, there's the innate immune response, which tends to recognize general features of pathogens rather than specific properties of individual bacteria or viruses.
What we're interested in is the adaptive immune response, which recognizes specific features in pathogens and generates a memory that produces a rapid and robust response if the same pathogen is ever seen again.It's the adaptive immune response that we're stimulating with vaccines.
The portion of the pathogen's protein that the antibody recognizes is called an epitope.And they often have amino acids that are polar or have a charge, since these form stronger interactions with the antibody.
You can't simply look at the amino acids in an antibody and tell what it's going to bind to.But if you have sufficient quantities of a specific antibody, it's possible to do what's called "epitope mapping," which involves figuring out precisely where on a protein the antibody is binding.
In some cases, this can include a precise list of the amino acids that the antibody recognizes.