8 But Daniel resolved not to defile himself with the royal food and wine, and he asked the chief official for permission not to defile himself this way. 9 Now God had caused the official to show favor and sympathy to Daniel, 10 but the official told Daniel, “I am afraid of my lord the king, who has assigned your food and drink. Why should he see you looking worse than the other young men your age? The king would then have my head because of you.”
11 Daniel then said to the guard whom the chief official had appointed over Daniel, Hananiah, Mishael and Azariah, 12 “Please test your servants for ten days: Give us nothing but vegetables to eat and water to drink. 13 Then compare our appearance with that of the young men who eat the royal food, and treat your servants in accordance with what you see.” 14 So he agreed to this and tested them for ten days.
15 At the end of the ten days they looked healthier and better nourished than any of the young men who ate the royal food. 16 So the guard took away their choice food and the wine they were to drink and gave them vegetables instead.
17 To these four young men God gave knowledge and understanding of all kinds of literature and learning. And Daniel could understand visions and dreams of all kinds.
Veggies and God are a better diet than Babylon's five-course meals, at least for Daniel and his buddies, better known by their adopted names Shadrach, Meshach and Abednego (the ones who a pre-incarnate Jesus said "well done, my good and faithful servant, well done" to in the furnace;-).
Normally, that diet wouldn't be a winner, but a well-chosen vegan diet can be healthy if you get the right mix of proteins. However, it was God looking after their well-being that was more important than getting enough legumes and a proper amino-acid mix; how much of it was nutrition and how much was the living Word is left to the imagination.
God gets the credit at the end, however. Even the most arch-vegan isn't going to claim they see visions with the right meat-free diet; that requires the right mushrooms or other things not available at Whole Foods Market or Trader Joe's.