The IoT and big data technologies have become essential to the functioning of both smart cities and sustainable cities, and thus, urban operational functioning and planning are becoming highly responsive to a form of data-driven urbanism. This offers the prospect of building models of smart sustainable cities functioning in real time from routinely sensed data. This in turn allows to monitor, understand, analyze, and plan such cities to improve their energy efficiency and environmental health in real time thanks to new urban intelligence functions as an advanced form of decision support. However, prior studies tend to deal largely with data-driven technologies and solutions in the realm of smart cities, mostly in relation to economic and social aspects, leaving important questions involving the underlying substantive and synergistic effects on environmental sustainability barely explored to date. These issues also apply to sustainable cities, especially eco-cities. Therefore, this paper investigates the potential and role of data-driven smart solutions in improving and advancing environmental sustainability in the context of smart cities as well as sustainable cities, under what can be labeled “environmentally data-driven smart sustainable cities.” To illuminate this emerging urban phenomenon, a descriptive/illustrative case study is adopted as a qualitative research methodology§ to examine and compare Stockholm and Barcelona as the ecologically and technologically leading cities in Europe respectively. The results show that smart grids, smart meters, smart buildings, smart environmental monitoring, and smart urban metabolism are the main data-driven smart solutions applied for improving and advancing environmental sustainability in both eco-cities and smart cities. There is a clear synergy between such solutions in terms of their interaction or cooperation to produce combined effects greater than the sum of their separate effects—with respect to the environment. This involves energy efficiency improvement, environmental pollution reduction, renewable energy adoption, and real-time feedback on energy flows, with high temporal and spatial resolutions. Stockholm takes the lead over Barcelona as regards the best practices for environmental sustainability given its long history of environmental work, strong environmental policy, progressive environmental performance, high environmental standards, and ambitious goals. It also has, like Barcelona, a high level of the implementation of applied data-driven technology solutions in the areas of energy and environment. However, the two cities differ in the nature of such implementation. We conclude that city governments do not have a unified agenda as a form of strategic planning, and data-driven decisions are unique to each city, so are environmental challenges. Big data are the answer, but each city sets its own questions based on what characterize it in terms of visions, policies, strategies, pathways, and priorities.