​​Why do satellites seem to be wrapped in Golden colored Foils?

This is referred to in the space community as Multi Layer Insulation (MLI). There are different types of it, the fancier stuff is made of alumnized polyimide (Kapton) which is where the gold color comes from. 
Depending on which way you have the outer and inner layers of the MLI configured you can have it both reflect solar energy and radiate heat, or retain heat while preventing radiation. So certain configurations will keep hot components hot and prevent them from losing heat to radiation, while other configurations will prevent heat from radiating into the component. It is also used to keep warmer spacecraft components (certain instruments, thrusters) from radiating heat to other parts of the spacecraft such as temperature-sensitive instruments.