Will drinking ice cold water and eating cold food cause weight loss (over a period of time)?

Sort of, yes.

Ice water is, in fact, a negative-calorie foodstuff and could be used to lose some weight. Fats contain about 37 kJ/gram of energy, drinking one glass of ice water will burn about 37 kJ or up to three times more if you eat some crushed ice as part of drinking the water: so that's 1 gram of fat burned per drink, up to 2-3 if you eat ice.

The normal advice of "drink 8 glasses of water per day" in principle leads to a direct weight loss of 3kg/year.

There are other negative-calorie foodstuffs, like celery. You generally have to look at a whole metabolic effect to see it, so you have to consider the cost of the whole digestion process and its effect on the body. For example, totally black coffee might raise your baseline metabolic rates enough that it loses more energy than it contains; it is very hard to know without an experiment.

But that misunderstands the problem.

The thermodynamics of weight loss is really easy and 100% correct. However it is not adequate for understanding the problem. If you have a complex system and you don't know all of the inputs, tweaking a dial labeled "more energy out!" will not necessarily discharge a battery that you see elsewhere in the system, and could potentially even charge it further, if you don't know what you're doing.

If you've been in physics for long enough you've seen feedback loops, at least in the cool feedback-based circuits you can make with op-amps, like analog integrators and analog derivative-takers. Biophysics has to deal with the exact same loops; they are a core part of how any living organism maintains homeostasis and collects energy. Ipso facto, your body contains several of these feedback loops operating within it, and any weight loss plan needs to take these feedback loops into account.

When you digest food, most nutrients get sent to the liver. Dextrose/glucose can more or less be forwarded on as-is; anything else needs to be turned into sugars so that you can use them. (In particular, there is a myth that fats go straight to your gut that is just not true.) There are a lot of processes that happen, but the most important one is related to a substance called glycogen, which is basically a "hairball" where the "hairs" are glucose sugar molecules. Every cell in your body can use the glucose to "compress" a phosphate group onto ADP to produce ATP, and these phosphate "springs" are then used as your direct mechanism of energy transport: complex proteins will often accept some of these "compressed springs" and, when they have the components they need, will then unleash them back into ADP to get the energy to actually perform whatever job the protein does.

Your liver basically maintains a large store of glycogen, and you can basically think of this like one big "cup" of fluid. When that cup is "overflowing", the liver stops filling it and starts to produce fat and stores it in fat cells in the adipose tissues. When it is under-filled, the liver sends signals to your brain to make you feel "drained", as you feel after a hard workout or after a day of fasting. Your body starts to remove fat from the fat cells and "burn" it again into ATP and glycogen etc. to have energy available.

So, there are three caches of energy: ATP, sugars like glycogen, and fat. When you run out of active ATP "fuel" your body seamlessly makes more from the glycogen available; in addition to inter-borrowing, the glycogen cache makes you feel "drained" as it depletes. It borrows from the triglycerides in the fat cells, which have their "backbone" ripped off and the three resulting "fatty acids" do a similar job to the glycogen: but the fat cells, as they deplete, make you feel "hungry."

[It's a little more complicated than that, but basically all of your fat cells all the time are transmitting a message saying "I'm satisfied" (the hormone called "leptin"), which contradicts the messages from your GI tract saying "I'm hungry" (other hormones in the "ghrelin" family), and your brain gradually acclimates to whatever the "balance" is between the two hormones, as "normal". From there, if you are losing weight, you become a little bit more hungry overall but a lot more susceptible to existing hunger cravings from your GI tract.]

So by itself, this loss in energy due to water will release signals triggering you to exercise less and eat more, and because of that, the small magnitude of "one gram per glass of ice water" is likely to get lost in the noise of "ten more/less grams of food per meal." The same is true of a half-hour workout every few days: 300 kcal of exercise will burn 34 grams of fat in the short term, but it will also move you off-equilibrium to the point where you're probably eating 100 grams more food per day, which will balance it out. For many people this is "snacking" but it can also easily be larger portions per meal.

This is why diet and obesity intervention needs to be a "lifestyle change". It's not that thermodynamics is wrong; rather it's 100% right for its limited part of the picture: but thermodynamics does not model complex systems like hormonal feedback to the brain very well.

In particular, with respect to this diet-intervention: drinking 8 glasses of water per day tends to "flush" your stomach contents into your intestines, which can increase ghrelin and make you more hungry.

The body surely needs to produce energy to heat the water one drinks - and it will heat water because almost everything in the human body is about 37 °C - but whether one loses weight in the process depends on whether the energy is taken from the accumulated fat, or from piles of extra food one devours because he or she is hungry and can't resist. ;-) The answer to this question (whether the energy is taken from the fat reserves) is an extremely complicated question in biophysics – or perhaps biology with some dependence on psychology, too.

There is another problem with the proposed diet: the heat needed to heat the water is pretty much negligible for the amounts of cold water one may drink each day.

Just to be sure, an adult man is supposed to eat 2,000 kcal a day in the food. One kcal (=4.18 kJ) is enough to heat one liter (kilogram) of water by 1 °C. If the water is heated from 0 °C to 37 °C, one needs to drink about $2000/37=54$ liters of water a day to consume the energy one gets from the normal amount of food.

That's clearly too much. Realistically, one will drink much less than 5 liters a day (even in the extreme cure), so less than 1/10 of the energy contained in the food will be used to heat the water. Food contains lots of energy – one may imagine that we're basically "burning it" and if one burns a kilogram of organic stuff, it is enough to heat a lot of water, indeed.

One could also try to eat ice which is dangerous for various reasons but one may give a calculation. The latent heat of melting of 1 kilogram of water is about 80 kcal – the equivalent of heating by 80 °C. $2000/80=25$ liters of ice is still needed to consume the energy one obtains from the normal dose of food.

There are some "technical" obstacles but the basic mechanism the OP is proposing is obviously valid. Some real-world experimentation would be needed to see whether the recipe can make a difference.

Even when you're hot, the body keeps producing heat, which it then goes through the trouble of shedding.

Unless you were already very cold, the heat to warm your water and food intake will come out of this surplus. The body may even save energy because it doesn't need to shed as much heat.

If you're willing to be very cold all the time, you can do so more efficiently by controlling environmental temperature and using light clothes. This could be effective, but do not try it without medical attention. Also, if you get to the point of shivering even slightly, you're doing it wrong.