Hot temperatures will affect a battery's ability to keep cool. A hot battery charges slower as it's thermal control reduces the rate of charge to keep things safe without which it would explode. Keeping a battery above 30c will cause it to degrade quicker. Similarly performance of the device will be affected by it trying to keep cool. If it's in a case, remove the case as that can help dissipate heat.
Don't stick it in a fridge, they don't like extreme cold