Yes you can bake food in a toaster oven.
A toaster oven is basically just a smaller version of a regular sized electric oven.
When baking in a toaster oven it may just take a bit longer to cook the baked goods than it would in a regular oven.
As long as you allow enough extra time for baking and the baked goods fit into the toaster oven you can bake the food in the toaster oven.
I've baked small pies, cookies, brownies etc all in a toaster oven when I didn't have a regular sized oven before and it worked great.
You can preheat the toaster oven if you want too and it's highly recommended that you do preheat your toaster oven before placing the food in the toaster oven to cook.
The reason you should preheat your toaster oven is to allow the food to start cooking faster since the toaster oven would already be hot and not cold.
However you do not have to preheat a toaster oven before cooking food in them if you do not want too.
But while I prepare my food to be put into the toaster oven I go ahead and get the toaster oven preheated.
That way the toaster oven is warmed up to the desired temperature and the food begins cooking immediately without having it starting from cold.