Panels can shade the roof, but they do not turn a poorly insulated room into a cool one.
SYSTEM DESIGNMYTH-BUSTING
Solar panels can reduce roof-surface temperature because they shade part of the roof from direct sunlight.
But indoor comfort is still driven mostly by insulation, ventilation, and HVAC performance. In many homes, the room-level cooling effect is modest rather than dramatic.
That is why panel placement should usually prioritize solar design and production logic rather than chasing a small possible cooling effect above one room.