Transformers are deisgned for a specified ambient temperature. Transformers with ONAN cooling have been operating in desert areas for a long time. Please be more elaborate in your question, indicate the design ambient temp, the sun radiation temp etc. for proper designing of the transformer.
For avoiding sun radiation temp the transformers are housed in a bay provided with roof.
For avoiding high temperature, besides protection from direct sunlight you should apply a modern dielectic oil different to the mineral based. Modern transformer oils are fire resistant up to 300 degrees C (it never gets to that temperature in the AZ desert even with direct sunlight) and also biodegradable, and best dielectric characteristics with good heat dissipation and protection of insulating materials.
We have been switching oils to these new ones in tropical climates where they might get to 160-170 C in cases of overloads and environment heat, and had no problem where otherwise mineral oils would take fire.