The researchers found that had cool, light-colored roofs been widely installed throughout London, it could have cooled the city by about 0.8 degrees C on average
White and reflective colours also mean tha a wide part of Solar spectrum is bounced back to atmosphere instead of being absorbed. Thus painting the roofs white prevents the building from heating up. Of course, it highly depends on insulation: in cooler climates modern roofs are well insulated, and the effect would be lesser. In hotter countries you can observe the same knowledge applied in vernacular architecture.
Friendly summary of the paper provided by Techxplore.com. The research is open access in nature.com