To promote the coordinated development between renewable energy and the distribution network, a capacity allocation model of battery energy storage systems (BESS) is proposed to achieve the coordinated optimization for active and reactive power flow, which can reduce the voltage deviation and improve the absorptive capacity for renewable energy. In addition, BESS with four-quadrant operation characteristics, on-load tap changer, and capacitor banks are treated as flexible devices to improve the adaptability for renewable energy fluctuations. In view of the uncertainties of renewable energy caused by the inaccuracy of historical sample data, a set of extreme scenarios with the characteristics of temporal and spatial correlation are considered to obtain a robust BESS configuration decision. The big-M approach and the second-order conic relaxation technique are utilized to convert the BESS capacity allocation model into a mixed-integer linear programming problem. Finally, the IEEE 33-node distribution system is taken as an example to verify the effectiveness of the proposed method.