All a refrigerator does is take heat from the inside and try and dissipate it outside of it's enclosure. If there is already too much heat outside, such as a really warm day then the ability to do its job is impacted. Also if the method of dissipating the heat, Usually coils on the rear or bottom of the unit (they get warm or hot) is impaired somehow, for example if the airflow past these things are blocked, then that will also have a dramatic effect.