This is a question that patients frequently ask. Dentists placing amalgam fillings often caution patients to wait 45 minutes after their filling to eat. This is advised because silver fillings tend to continue to harden after placement and the consensus is that after 45 minutes they are hard enough to withstand the forces that will be placed on them by eating.
Composite fillings are immediately ready to withstand the forces of mastication(eating) after placement- no waiting needed! That being said, most patients are numbed when having a filling and should not eat until the numbness goes away. This is especially true for patients having a mandibular block. Mandibular blocks are commonly used for achieving anesthesia prior to filling teeth in the lower jaw and they result in profound numbness in the tongue and lower lip (on one side).
My father who was a patient and a big fan of mine once returned after a dental visit and mentioned, almost apologetically, that he thought that possibly I had made a cut in his tongue during his last visit. I looked in his mouth and there was a fairly large gash in the side of his tongue. Knowing that I hadn't happened during treatment, I asked if he had anything to eat after leaving his last visit and he confessed he had a hot dog at the train station afterward.
My father's story points out the importance of not eating any food while still numb, since there is a definite possibility of a patient injuring a numb area. Hot foods may cause a burn and numb tongues and cheeks may be inadvertently bitten while they are numb and lacking normal sensation.