The hydrolysis of a peptide bond or bonds within a protein contributing to antigen processing and presentation.