What can be the cause of a 4 year old child having bad anxiety?

Bad Anxiety 4 yrsold. Well, it's around that time that school begins for many children. That's a big hurdle developmentally. Some children have no reaction and love it, while others are anxious and upset for up to 3 months. Be reassuring, listen to your child, be warm and supportive.
Multiple causes. Your child maybe experiencing anxiety if there is conflict in the home, daycare or preschool. If the parental relationship is strained. If either parent, or both, is anxious. If there are a lot of changes, such as moving, a new sibling, change in school, etc. His diet is not the cause of anxiety!
Diet! Sounds strange? I have seen it all too often. Anxiety is an emotional reflex, not a thought process. The child has no idea why he/she is anxious. Try cutting out sugar, ice cream, pop and "junk" and give a well rounded multivitamin. You might be surprised.
A combination of. Genetic & environmental factors usually exist. Separation anxiety & specific phobias ( e.g., fear of the dark) are more common, but some 4-yr.-olds' have ocd, though they can't describe their obsessions.The best book, now out of print, was "blink, blink, clop, clop, why do we do things we can't stop?"if the anxiety drives behaviors that impact his & family functioning, see a child psychologist.