We consider the bending angle of the trajectory of a photon incident from and deflected to infinity around a Reissner–Nordström black hole. We treat the bending angle as a function of the squared reciprocal of the impact parameter and the squared electric charge of the background normalized by the mass of the black hole. It is shown that the bending angle satisfies a system of two inhomogeneous linear partial differential equations with polynomial coefficients. This system can be understood as an isomonodromic deformation of the inhomogeneous Picard–Fuchs equation satisfied by the bending angle in the Schwarzschild spacetime, where the deformation parameter is identified as the background electric charge. Furthermore, the integrability condition for these equations is found to be a specific type of the Painlevé VI equation that allows an algebraic solution. We solve the differential equations both at the weak and strong deflection limits. In the weak deflection limit, the bending angle is expressed as a power series expansion in terms of the squared reciprocal of the impact parameter and we obtain the explicit full-order expression for the coefficients. In the strong deflection limit, we obtain the asymptotic form of the bending angle that consists of the divergent logarithmic term and the finite O(1) term supplemented by linear recurrence relations which enable us to straightforwardly derive higher order coefficients. In deriving these results, the isomonodromic property of the differential equations plays an important role. Lastly, we briefly discuss the applicability of our method to other types of spacetimes such as a spinning black hole.