Container terminals are moving towards using renewable energy sources to manage their operations and cope with the traditional ones impacting the environment. However, renewable energy sources are limited, more costly, uncertain, and supplied in a non-continuous way. To improve operations' sustainability, terminals are called to alternate between traditional and renewable energy sources. In this context, this paper proposes a multi-objective mathematical model to solve the berth and quay crane allocation and scheduling problem (BACASP), considering energy uncertainty and operations' sustainability. The model considers two conflicting objectives: maximising renewable energy usage and minimising operational and energy costs. A robust version of the model is proposed to handle the uncertainty of renewable energy availability, whose objective is to optimize the worst-case scenario. Since many uncertain scenarios are involved, a simple commercial solver could not solve the model, even for small instances. Thus, we propose an exact decomposition algorithm that alleviates the model complexity, based on novel reinforcement procedures including novel set partitioning and valid inequalities, lower bounds, a warm-up scenario picking formula, speed up upper bounds, and a max-min MIP cutting pro-cedure. A series of experiments show how the proposed approach helped tighten the model bounds, improve algorithm convergence, and alleviate computational time. We also conduct an economic analysis to assess the value of integration of energy parameters within BACASP. An additional investigation is made to show how Pareto optimal curves are sensitive to the price and availability of renewable energy uncertain scenarios.