This paper uses a convex reformulation to deal with the robust, optimal energy management of battery energy storage systems (BESS) and renewable energies in DC microgrids. This relaxed mathematical model guarantees the global optimum regarding energy management problems, even when including uncertainties in demand and renewable energy. The proposed robust model can reach the best scheduling for energy management in worst-case cost scenarios while satisfying all requirements. Furthermore, a model for power transfer losses in converter devices is added to the proposed model by using a binary polynomial representation, which is convexified. This convexification is performed by transforming the nonlinear non-convex equations of the optimal energy management model into second-order cone constraints. Four scenarios implemented in the modified IEEE 123-bus radial distribution feeder are proposed in order to analyze the robust optimal energy management strategy: the deterministic model, demand uncertainty, uncertainty in solar and wind generators, and uncertainty in demand and solar and wind generators. In all scenarios, the energy management model reduces the total energy costs. Simulation scenario 1 showed daily operating costs of about US$ 4376.82, while simulation scenarios 2, 3, and 4, including demand and generation uncertainties, increased the daily operating costs by about US$ 5243.23 (19.79%), US$ 5072.23 (15.88%), and US$ 5738.75 (31.12%), respectively. Scenario 4 showed the highest costs, as it involves more uncertainty. Hence, the robust optimal energy management strategy dispatches more energy from conventional generators, increasing the operating costs to satisfy those of the worst case.