The plants use the sun as their energy, using photosynthesis.
The insect and animals get their energy from the food they eat.
And bacteria get their energy by decomposing dead organisms.
You might have to do the research on what each animal eats if you need specific answers.
I'm sorry this isn't much, but hope this helps you out! :)