The extensive installation of gas-fired units and the substantial increase in natural gas consumption have strengthened the interdependence between power system and natural gas system. Therefore, the uncertainty of wind power brings new challenges to the safe and economic operation of the electricity–gas integrated energy system (IES). To optimize the operating costs of the energy supply side, an optimal electricity–gas energy flow (OEGEF) framework considering wind power uncertainty is established to maximize the social welfare (SW) of energy suppliers, energy storage suppliers and flexible users. Under this framework, based on the historical wind power data, a data-driven distributionally robust chance constrained (DRCC) model is proposed and the tractable reformulation form is given. In addition, a distributed manner via alternating direction method of multipliers (ADMM) is adopted to solve the power system sub-problems and the natural gas system sub-problems for protecting privacy data. Compared with the deterministic model, the uncertain model of Gaussian distribution and symmetrical distribution, the proposed model has stronger robustness. The case studies are conducted by two IESs of different scales, the results of numerical examples show that the model is effective for the optimal coordination of uncertain IES.