Renewable energy sources (RESs) and electric vehicles (EVs) have been introduced as efficient technologies to address environmentally friendly and sustainable energy sources. However, the widespread integration of distributed renewable sources into the power grid and the growing adoption of EVs pose new challenges for distribution network operators. These challenges necessitate careful management to mitigate their impacts, particularly in meeting the additional demand arising from EV charging. To achieve these targets, it is necessary to strategically integrate RESs and EVs. This study focuses on the optimal allocation and energy management of distributed energy resources (DERs) and electric vehicle parking lots (EVPLs), taking into account the inherent uncertainty in the output power of these resources. Notably, parking lots (PLs) utilize vehicle-to-grid (V2G) technology of EVs and aggregate and inject their power into the distribution system. Therefore, EVs as a motion type of energy storage system play a significant role, especially in the on-peak hours. The optimization problem is addressed using the salp swarm algorithm (SSA) while adhering to operational constraints related to the power system, as well as both DERs and EVPLs. The main goal is to simultaneously enhance the technical, economic, and environmental performance of the system, by solving a multi-objective optimization problem. The effectiveness of this approach is evaluated using the IEEE 33-bus distribution system, with the study considering five different scenarios. The simulation results reveal that the planned deployment of DERs, given their proximity to the load centers, has effectively mitigated the overload impacts resulting from EVs’ charging. Furthermore, the implementation of a demand response program (DRP), cooperatively with the aforementioned resources, has significantly improved all key operating indicators of the system.