The networking of microgrids has received significant attention in the form of a smart grid. In this paper, a set of smart railway stations, which is assumed as microgrids, is connected together. It has been tried to manage the energy exchanged between the networked microgrids to reduce received energy from the utility grid. Also, the operational costs of stations under various conditions decrease by applying the proposed method. The smart railway stations are studied in the presence of photovoltaic (PV) units, energy storage systems (ESSs), and regenerative braking strategies. Studying regenerative braking is one of the essential contributions. Moreover, the stochastic behaviors of the ESS's initial state of energy and the uncertainty of PV power generation are taken into account through a scenario-based method. The networked microgrid scheme of railway stations (based on coordinated operation and scheduling) and independent operation of railway stations are studied. The proposed method is applied to realistic case studies, including three stations of Line 3 of Tehran Urban and Suburban Railway Operation Company (TUSROC). The rolling stock is simulated in the MATLAB environment. Thus, the coordinated operation of networked microgrids and independent operation of railway stations are optimized in the GAMS environment utilizing mixed-integer linear programming (MILP).