I tried to make muffins and they were really dry and tuff and made me sick but I never get sick from store bought muffins or breads.
There are a lot of super bakers on this site who will have other things to add, but if you don't bake much, and you used any OLD ingredients, including oil, butter, flour, baking powder or baking soda, that could make anyone not feel great. Simple test: buy new flour, new baking soda, new baking powder, etc. - whatever the recipe calls for, make sure it's fresh - and see how that goes.
I agree with everything Pegeen says. I just wanted to add that the quality of your ingredients is important, too. Buy the better boxed mixes if you went that route or buy the best flour you can afford. I don't bake much, and I have to do it gluten-free, and there is a world of difference between the lesser brands' versions of mixes and flours versus King Arthur and such.
The only other thought I had was that you may be able to pinpoint it to the type of fat you put in. If you were using seed oil, like Canola, that stuff goes rancid pretty easily which can make you sick. I always use butter for baking (if the recipe allows for it) to avoid the issue.
Another thought would be your eggs - if they were fresh versus old or if they were good or not. An easy way to do this is the "float test" where fresh eggs will sink and bad eggs will float.
You also have to remember that store bought baked goods are scientifically designed to have desirable characteristics and be shelf-stable. Companies make their own flour blends, often adding a little more gluten or other things to make that perfect, fluffy texture you expect. They also mix everything in machines that are precise and timed perfectly, limiting over-mixing as a factor of dense, undesirable goods.
Needless to say... there are just so many factors.