The smart grid paradigm has provided great opportunities to decrease energy consumption and electricity bills of end users. Among a wide variety of end users, electrical railway systems with their huge installed power capacity should be considered as a vital option in order to avoid wasted energy, provided that an energy management system is utilized. In this study, a mixed-integer linear programming model of a railway station energy management (RSEM) system is formulated by a stochastic approach, aiming to utilize the emerged regenerative braking energy (RBE) during the braking mode in order to supply station loads. Furthermore, the proposed RSEM model is composed of an energy storage system (ESS), RBE utilization, photovoltaic (PV) generation units, and an external grid in this paper. The passengers' impact on RBE as well as the stochastic behaviour of the initial state-of-energy of ESS along with uncertainty of PV generation by the RSEM model are also evaluated. The model is tested under a bunch of case studies formed considering several combinations of the cases that an ESS or PV are available or not and using RBE is possible or not.