The general thought is no. The leavening will wear out. If you want to do something ahead of time, I would either:
1. Mix the dry ingredients and the wet ingredients separately, refrigerate the wet ingredients and then mix right before baking.
or
2. Depending on the denseness of the cake or bread, bake ahead and wrap the cake/bread tight in plastic and refrigerate overnight, and then reheat if desired the next day.
Certain bread and roll doughs can be made and left to rise overnight, but batters generally won't make it.