Can divorced individuals become godparents or sponsors for baptism and confirmation?

If the person in question is living a life in keeping with the Church’s expectations for someone in that situation, yes.

On the other hand, if the person does not have a Church annulment and is in a romantic relationship or has attempted remarriage outside the Church, then that person is not living “a life of faith that befits the role to be undertaken [i.e., baptismal or confirmation sponsor],” as required by canon law (CIC 874), and so another candidate for the role should be chosen.