This paper investigates the impacts of renewable energy resources and energy storage systems (ESS) on flow-gate marginal pricing (FMP) and locational marginal pricing (LMP) in a deregulated environment. Renewable energy resources including wind turbines and photovoltaic solar cells are modeled and discussed. Also, ESS are defined and mathematically modeled. Then, the mathematical formulation of LMP and FMP and their relationship are discussed. An IEEE six bus test system is considered as a case study. Several simulations are carried out to investigate the impacts of renewable energy resources and ESS on LPM and FMP. Furthermore, a comprehensive sensitivity analysis is conducted. It is demonstrated that renewable energy resources and their related uncertainty have a great impact on both LMP and FMP. Also, charging and discharging states of ESS significantly change LMP and FMP. It is also demonstrated that the reactive power of loads and line capacities are highly important in the FMP analysis.