Powered by renewable energy sources, cellular communication systems usually have different wireless traffic loads and available resources over time. To match their traffics, it is beneficial for two neighboring systems to cooperate in resource sharing when one is excessive in one resource (e.g., spectrum), while the other is sufficient in another (e.g., energy). In this paper, we propose a joint energy and spectrum cooperation scheme between different cellular systems to reduce their operational costs. When the two systems are fully cooperative in nature (e.g., belonging to the same entity), we formulate the cooperation problem as a convex optimization problem to minimize their weighted sum cost and obtain the optimal solution in closed form. We also study another partially cooperative scenario where the two systems have their own interests. We show that the two systems seek for partial cooperation as long as they find inter-system complementarity between the energy and spectrum resources. Under the partial cooperation conditions, we propose a distributed algorithm for the two systems to gradually and simultaneously reduce their costs from the non-cooperative benchmark to the Pareto optimum. This distributed algorithm also has proportional fair cost reduction by reducing each system's cost proportionally over iterations. Finally, we provide numerical results to validate the convergence of the distributed algorithm to the Pareto optimality and compare the centralized and distributed cost reduction approaches for fully and partially cooperative scenarios.