Refrigerator won't cool if it's warm in the house
Refrigerators are cooled using a heat pump, the principle that all air conditioners work on. Basically, a refrigerant is pumped through the cool side and absorbs heat, then that heat is radiated out into your home. The hotter your home's air is the more difficult it is for the fridge's cooling system to radiate heat. A refrigerator that is working fine won't have a problem with this, it just takes a bit more energy to work, however your refrigerator has a problem. 

I can't say for sure what's wrong with your refrigerator, but it could be a number of things:


Fouled radiator: over time the radiator on the back of the refrigerator can get covered in dust and crud which reduces its efficiency. If it's bad enough the fridge won't be able to work. This is easy to resolve, you pull the refrigerator away from the wall and vacuum the radiator off. If there's stuck on grease clean it off with a brush and/or cleanser, but don't use any abrasives or power tools. Make sure all grates are clear of dust and aren't blocked so the internal components can cool too. When you put it back make sure you leave enough clearance for air to circulate around the radiator
Low refrigerant: Over time the refrigerant in your refrigerator may seep out and need to be replenished. There could also be a slow leak. You obviously have some refrigerant or it wouldn't cool at all. You'd need to get a specialist in to replenish the refrigerant, they'll also run a pressure check for leaks
Mechanical problem: there are compressors and pumps which move the refrigerant around the system, if these have problems they may not be able to keep up with the demand. You'd need a specialist to diagnose and fix these problems


So, pull out your fridge and give the back a thorough clean, then make sure it's got good airflow and see how it works. If that doesn't solve your problem you'll have to get someone in.