Only certain things at certain times under certain circumstances, and rarely, if ever, without a significant amount of difficulty.
Wookieepedia's article on Vader's armor says:
The collar [of his suit] was equipped with feeding straws that allowed Vader to feed himself from an implanted bladder filled with RepMed vitapaste1, and could be refilled either during monthly maintenance, or on demand. Despite this, however, a redundant system to accommodate intravenous feeding was also installed because of the vitapaste's terrible taste...
Vader could take food through his mouth, but only when he was inside a hyperbaric chamber, since he had to remove his triangular respiratory vent. It was therefore easier for Vader to receive nourishment through liquids, intravenous and otherwise, and to rely on catheters, collection pouches, and recyclers to deal with liquid and solid waste. Though liquids were preferable, he still had the capacity to chew if he wished, though a nutrient feed provided Vader with all the nourishment he required. In the event that he did desire oral consumption, he also ingest RepMed vitapaste via straws located inside the grills of his facemask. In public, Vader was known to claim that he never ate or drank.
The process presumably takes place either on the go, as he sees fit, or inside his meditation chamber, where he is safe from prying eyes that might take delight in seeing how dependent he is.
This interesting scenario played out in an early draft of the script for The Empire Strikes Back, just after the famous scene in which Han, Leia, and Chewie are led to a dining room on Bespin:
Everyone is at table, Darth Vader presiding at the head; he is neither eating nor drinking. Lando eats with a good appetite. The others; Chewbacca sits quiet, not touching anything. Han and Leia have lost their appetites but both…and especially Han…are drinking wine. Looking at Lando and contemplating murder.
LANDO : You see, Han, I had no choice. I knew who the Princess was the moment you landed, I knew that the Empire wanted you both…and the Empire is important to me. I suppose that I really owe my comfortable existence here to the Empire, though I'm not a part of it, and I continue to trade with both sides. So I really had no choice.
HAN : I hope you were well paid. You know what’s going to happen to us.
LANDO : Lord Vader assured me that nothing would happen to any of you.
LEIA : Ha! I’ve enjoyed Lord Vader’s hospitality before. What’s the matter, Lord Vader? Have you gone so far beyond humanity that you no longer need to eat, or drink?
DARTH VADER : I have had to forego those simple pleasures, along with many others; but there are compensations I survive. And you’re forgetting something, Princess. When we entertained you aboard the Death Star, you had information that we needed. Now you have nothing.
- Leigh Brackett Draft Script, The Empire Strikes Back, found on the Jedi Bendu Script Site.
From the always excellent Star Wars Technical Commentaries site:
Flashed images of Lord Vader's skeleton in Return of the Jedi hint that he still possessed teeth, although it is possible that they're bent inwardly somewhat. Shadows of the Empire explicitly reveals his teeth, which he gnashes in anger at one point when he is being humiliated by the Emperor in the presence of his rival, Prince Xizor. In the same instance Vader has thoughts about biting off his tongue and swallowing it.
This implies that he is still capable of chewing and consuming food in the ordinary fashion. Although he sat at a banquet table in Cloud City in The Empire Strikes back and he held a drink on one occasion in the Death Star conference room in the novelisation of A New Hope it is unknown whether he has any mechanism which will allow him to eat while masked. It seems most likely that he only takes nourishment while unmasked in the privacy and safety of his medical chamber. We can assume that his chambers also provide facilities to deal with the other end of his alimentary process.
- Star Wars Technical Commentaries, article titled Injuries of Darth Vader
Summary:
Yes, Vader can eat, both in weird, cyborg ways and almost human ways, but he rarely - if ever - does so. For one thing, eating like a somewhat normal person would require him to remove his helmet, which is both humiliating and dangerous, both physically and in terms of destroying his reputation as an invincible monster. It would also amount to an enormous hassle. Finally, he has no need to eat. He had a regularly refilled pouch of the appalling but nutritious Vitapaste inside his suit, with convenient tubes running directly from the pouch to his mouth, and on top of this, because he hates the taste of Vitapaste, he asked for, and received, a custom made IV system capable of eliminating the need to eat anything at all, even the vile Vitapaste.
Despite being technically able to eat (and apparently, to digest food - I found no evidence that his digestive system was compromised during or after his catastrophic injuries on Mustafar), he doesn't seem to exercise this ability, and prefers to obtain nutrients intravenously, or in a pinch, via feeding tubes.
Speculation:
We have to keep in mind that Vader is, as his former mentor says, "more machine than man". I get the distinct impression that this is exactly how Vader wants it. He doesn't like his situation, but he doesn't want to be human either. He wants to be the cold, calculating machine that everyone seems to take him for. As such, eating probably represents, for Vader, an inconvenient necessity, and what's more, an unpleasant and unwelcome reminder of the man he once was.
In addition to all of this, he also seems to feel a significant amount of self hatred, which was always present in his psyche, but which became especially pronounced when he was led to believe that he was directly responsible for Padme's death. He might actually feel that he doesn't deserve creature comforts like good food.
1Of course, Wookieepedia has an article on the vitapaste as well: "RepMed vita paste was an edible paste provided for those beings unable to consume food normally. After his injuries on Mustafar, Darth Vader consumed this product through feeding straws in his mask. DD-13 made the implication that it tasted awful" [Note: DD-13 is a medical droid].