While they may seem like they are draped in precious metal, it’s usually not gold at all… or even foil! It is actually a material called multi-layer insulation, or MLI.
MLI consists of lightweight reflective films assembled into thin layers that range in thickness. These layers are usually made of polyimide or polyester films (types of plastics) coated with very thin layers of aluminum. The exact composition depends on where the satellite will orbit, what the insulation will be protecting and how much sunlight it will be exposed to.
The gold and silver colored sheets you see are often a single layer of aluminized polyimide with the silver aluminum side facing in. The yellowish-gold color of the polyimide on the outside gives the satellite the appearance of being wrapped in gold.
Multi-layer insulation is used on satellites primarily for thermal control and protects the delicate on-board instruments from the extreme temperatures of space. Depending on its orbit, a satellite can experience temperatures from below -200°F to well above 300°F, sometimes at the same time! Not to mention the high temperatures the onboard instruments can produce.
While MLI does not insulate a spacecraft from heat conduction or convection very well, this doesn’t particularly matter in the near-vacuum of space. With no air around, radiation is the dominate form of heat transfer. MLI is designed to reflect solar radiation back into space, keeping the instruments cool enough to operate while in sunlight. It also maintains internal temperatures by keeping heat in, protecting the instruments from the extreme cold experienced when the spacecraft moves through Earth’s (or its own) shadow.
MLI can also provide a layer of defense against dust impacts, protecting delicate internal instruments and sensors from tiny particles of space debris.
Although sheets of gold are not used to cover entire satellite bodies, real gold is in fact used on some satellite components. From vapor-deposited gold taping to gold coating, gold is used because of its multiple benefits in outer space. Gold helps protect against corrosion from ultraviolet light and x-rays and acts as a reliable and long lasting electrical contact in onboard electronics.
Gold is also used by NASA in the construction of spacesuits. Because of its excellent ability to reflect infrared light while letting in visible light, astronauts’ visors have a thin layer of gold on them to protect their eyes from unfiltered sunlight.