I think we all grew up with the importance of the food pyramid, but previous to this, was there any precedence for the importance of variety in diet?
Well, throughout history is a very big place for a very long time; so yes, I'm sure that some people at various times and places did see variety of diet as a very important thing. Many--perhaps most--historical people did not see a particular importance for variety, however. Plus, there are different reasons for wanting or prioritizing variety.
For ancient Greeks and Romans who subscribed to the dominant medical theories of the day, those of Hippocrates and Galen, variety of diet in and of itself was not important. These doctors argued that human bodies and health were governed by "humors," fluids: blood, yellow bile, black bile, and phlegm. Each fluid was associated with an element (air, fire, earth, and water), a season (spring, summer, autumn, and winter), an organ (liver, gall bladder, spleen, brain/lungs), a pair of sensations (a combination of one of hot/cold and one of wet/dry), and certain personality characteristics (courageous, calm, hopeful, irritable, and so on). So blood, for example, was associated with air and was considered hot and wet, was associated with the liver and springtime, and with courage, hope, and love. Phlegm was associated with water and was considered wet and cold, black bile was earth, dry, and cold, and yellow bile was fire, dry, and hot.
Health was a matter of maintaining a balance of these humors and their characteristics in an individual, although everyone's balance was slightly different and was related to their particular environmental or seasonal conditions. So, some individuals might be more sanguine, dominated by blood, or more phlegmatic, dominated by phlegm. Foods fit into these humors, so that any food could be associated with a particular humor: spices were hot and dry (yellow bile), red meat was hot and wet (blood), fruits were cold and wet (phlegm). Foods related to health, then, in that they could influence one's constitutional balance of humors, both pushing one out of balance and into ill health, or restoring the balance and thereby restoring health. A person needed to eat foods that fit properly with their own balance, and thus one individual might benefit from a diet of lots of meat, coarse bread, and red wine; another person might need to stick with fish, fruits, and vegetables. So, ultimately, ancient Mediterranean doctors saw variety in foods as meaningful--it offered a range of humoral influences--but not necessary for an individual's health.
Of course, there was no centralized medical authority in those days, and thus people were free to practice all kinds of medicine and to recommend all kinds of diets. I'm sure some ancient gastronomes did claim that variety of diet was important though I don't know of any specific examples. On the other hand, some philosophers argued explicitly against variety, on Stoic grounds: Epicurus (who gives us the word Epicurean) recommended a diet of barley cakes and water. He argued that fancy and extravagant foods simply generated greater desire in a person, while barley cakes could give as much pleasure when someone in need consumed them.
People for much of history likely did eat a variable diet, whatever their doctors or philosophers recommended. This is because, without the modern "cold chain" and globalized food systems developed in the nineteenth century, everyone's diet was essentially local and thus varied seasonally. This changes, and is highly variable around the world, but I'll stick to Britain, the case I know best. Andrea Broomfield's wonderful Food and Cooking in Victorian England documents that shift in British food and cooking from the local and rural food systems of the eighteenth century to more global and urban food systems in the nineteenth century. Eighteenth-century cookbooks were full of recipes for taking a large amount of some locally produced item--apples, pears, herbs, garlic, rose hips, whatever--and processing it. These are recipes for people who experience seasonal abundance, as all the applies ripen at once, for instance, and for whom a major element of cooking is to find ways to preserve that abundance for periods of scarcity.
The industrial revolution in the nineteenth century, however, substantially changed that. More and more people lived in cities (a majority of Britons by 1851), where they had much smaller kitchens, reduced access to fuel for cooking, and very little access to the rural abundance they knew in the eighteenth century. In addition, their food came from further and further away and there were many more intermediaries between food's production and consumption. In short, food became more highly processed, and diets became more homogeneous. Diets for working Britons were probably worst in the middle decades of the nineteenth century: a majority of them lived in cities, but the food system was capable of producing a quite limited range of foods for urban consumption. Most people lived primarily on bread (up to a pound per day), potatoes, salted pork, and tea. Looking at Dr. Edward Smith's dietary surveys from Lancashire in the 1860s, for example, reveals a diet for cotton factory workers with very little variety, few fruits and vegetables, and focused on maintaining energy levels with lots of starch. Of course people got some fruits and vegetables, and many were able to maintain kitchen gardens and buy from seasonal fruit vendors. Anna Davin's history of childhood in late-Victorian London (the name escapes me) notes that many mothers routinely used "pot herbs" in their soups: garlic, onions, carrots, celery, and various herbs. She even found one very poor mother who always used them, and who said something like "a pennyworth of potherbs does more good for the child than a pennyworth of soap," so her very poor family was perhaps a bit dirty behind the ears but had more satisfying dinners. Of course, people of means continued to eat a much wider range of foods simply because they had the money to pay cooks to prepare them.
But, it is important to recognize that at the time, medical understandings of nutrition did not prioritize variety. The development of chemical physiology in the early nineteenth century displaced humoral medicine (that's an oversimplification, sorry), but replaced with a pretty narrow set of concerns. Justus von Liebig, most famous for his theories of plant physiology, argued that "nitrogenous foods," basically proteins, were the only truly nutritional food, responsible for allowing bodily growth and movement. "Non-nitrogenous" foods such as starches and fats he thought provided only body heat. And, beyond the relative amounts of nitrogen and carbon in foods, he saw no need for any other kind of nutrient. As such, his ideal diets were not marked by variety. His ideas were almost immediately challenged, but the idea of micro-nutrients like vitamins and minerals was not really common until much later in the nineteenth century. "Vitamin," from "vital-amine" was not coined until 1912. Between Liebig in 1840 and Casimir Funk's "vitamines" in 1912, you see a slow shift in medical recommendations of diet from ones that emphasize ONLY nitrogen and carbon to ones that recognize that variety of food improves health. With the beginning of state-provided school dinners in 1906, for example, milk and juice were included on the broad understanding that they improved health, even if doctors of the day did not have precise explanations for why. (See James Vernon's Hunger for more on school dinners.)