In his 1935 story "Alas, All Thinking," Harry Bates mentions food pills as a mechanism of the far future: humanity has evolved into a big brain on a pipe-stem neck, and atrophied bodies are fed by food pellets ejected into the mouth by a machine.
In the 1973 movie Soylent Green starring Charlton Heston and Edward G. Robinson, real food was no longer available to anyone but the super-wealthy. The masses were fed on Soylent Green, a food substitute, which resembled a wafer more than a pill.
The first "food pills" were developed in the 1960s for consumption in outer space by NASA astronauts. The food wasn't actually in pill form; it was a freeze-dried powder. You rehydrated it by adding water and drank it through a straw. A version of dehydrated orange juice, Tang, is sold in supermarkets today.
The next step in food pills is micro-MRE's, food tablets being developed that have enough calories in a single pill to sustain an active man or woman for 24 hours. The Department of Defense is also studying food patches that feed the wearer nutrients directly through the skin.