I don't know a lot about the subject so I asked my boyfriend who knows way more about solar energy.
Paraphrasing him, the short reply to moving solar panels into cities is a no.
The longer answer is a multitude of reasons, but the main one is weight. Most house roofs, especially in older buildings will not be able to carry the weight of solar panels. The return from having solar panels on roofs in the city will also not be as good as if they are in the fields because the panels can't move and maybe some roofs are placed in bad positions for optimal sun intake.
He also mentioned higher risks of fires due to the space between the roof and the solar panels, potentially feeding a fire with oxygen and making harder to put out the fire.
Due to the nature of a city layout, the solar panels would also be peppered out in a bigger area than if they were all collected on one plain field. This also means difficulties with maintainece which also costs more time and money than if you keep them in a field.
Keeping them in a concentrated area in a field is the most optimal solution for now. Maybe in the future, if solar panels have their weights significantly reduced, it will be a viable option to place them on roofs in cities. As for now, the best we can do with urban solar panels is to have them in mind when new buildings are raised and several contracting companies apparently work on this already, so things are happening. But many big Danish cities have old buildings, some are hundreds of years old. Its not uncommon to find houses here that are between 200 ans 400 years old.
I would like to add, that if we did like they have in the Netherlands and close down one third of our pig production, we would be able to secure more wild life areas that we have had in a hundred years and still have land for solar panels to spare.
To me it isn't an either or with solar panels and nature. We could have both. Currently we barely have space for either because the pig farmer take up all the space to grow pig food.
I don't think people understand how actually insane it is with the farming here. There is not one place here where you don't see fields. They take up all the space. If we shut down their industry, there would be more space for nature while the space needed for solar energy wouldn't even take up a 10th of land. I don't have the actual numbers of space needed for solar panels, but it would be ridiculously low. I am way more interested in having the pig food fields confiscated by the state and made into protected nature. That is where the true gain for nature lies.
Also: According to my boyfriend, the current energy production in Denmark which is covered by solar panels and especially windmills is around 60%. We aren't far from having reached our goal for sustainable green energy so the solar panel fields are literally nothing in the grand scheme of things.