The process in which B cells produce antibodies with increased antigen affinity. This is accomplished by somatic hypermutation and selection for B cells which produce higher affinity antibodies to antigen.