Your energy intake needs to be lower than the energy expended, doh! — and it doesn't matter much what food group you get the calories from.
On this subject, will just add this recent research. Full article here
But a large new study published on Wednesday in the journal BMJ challenges the conventional wisdom. It found that overweight adults who cut carbohydrates from their diets and replaced them with fat sharply increased their metabolisms. After five months on the diet, their bodies burned roughly 250 calories more per day than people who ate a high-carb, low-fat diet, suggesting that restricting carb intake could help people maintain their weight loss more easily.
The new research is unlikely to end the decades-long debate over the best diet for weight loss. But it provides strong new evidence that all calories are not metabolically alike to the body. And it suggests that the popular advice on weight loss promoted by health authorities — count calories, reduce portion sizes and lower your fat intake — might be outdated.