  Pairing correlations play an important role in a variety of nuclear
phenomena. However, a quantitative understanding of proton--neutron $(pn)$
pairing, especially isoscalar $pn$ pairing $(S=1, T=0)$ remains elusive. To
clarify the property of $pn$ pairing, we investigate the roles of $pn$ pairing
in the $M1$ transition of $N=Z$ odd--odd nuclei. We develop a theoretical model
based on the generator coordinate method (GCM) in which the isoscalar and
isovector $pn$-pair amplitudes are used as the generator coordinates. Using the
particle and the angular-momentum projections, the $pn$-pair GCM well
reproduces the $M1$ transition of odd--odd nuclei for the exactly solvable
SO(8) model. We apply the method to $N=Z$ odd--odd nuclei and find that the
experimental values of $B(M1)$ are well reproduced. We also study the
sensitivity of $B(M1)$ to the strength of the isoscalar pairing interaction.
