Answer
The second law of thermodynamics tells us that heat won't spontaneously flow from cold regions to hot regions. The refrigerator must do work to pump heat from the cool inside food compartment to the warmer room.
The warmer the room, the greater the temperature difference, and the harder the refrigerator must work. Thus it consumes more energy in a warm room than in a cold room.