If you are leaving home for a short period, like a short vacation, the refrigerator should be left on. Refrigerated foods that are able to be frozen will stay preserved longer if stored in the freezer.
If you are leaving the refrigerator turned off for an extended period, remove all food and unplug the power cord. Clean the interior, and leave the door open to prevent fungi from growing in the refrigerator.
If doors are opened or closed too often, warm air may penetrate the refrigerator and raise its temperature. This can increase the running costs of the unit.