When bacteria grow on food they sometimes produce gases, which can make packaging swell. This is the most likely explanation for what happens when a package is inflated. You never know what type of bacteria is actually growing; the safest thing to do is throw away the food, even when the contents of the package are to be cooked before eating. During growth the bacteria may actually produce heat-stable toxins, which can make you seriously ill.
Warm temperatures enhance bacterial growth. You should thus always try to put food in the fridge as quickly as possible, especially in warm weather, and avoid leaving food in a warm car boot. Food might also get too warm if your fridge isn't cool enough. Using a fridge thermometer, check that the coldest part of your fridge is between 0°C and 5°C. If your fridge has an internal freezer compartment that is iced up, this could mean that the fridge will not maintain its temperature.