It depends on what's in the filling and frosting. If it's just regular buttercream, they're fine. If it's anything perishible, you have a 2-4 hour window. After 2 hours, the bacteria starts hopping - after 4 hours, you need to throw them out.
When I did a cupcake tower of 216 cupcakes, the cupcakes were not filled and I used regular bc that was fine to leave at room temp. The cupcakes were brushed with a simple syrup and iced the night before and placed in cupcake containers for transport. After set-up the cupcakes remained exposed for 3-4 hrs and they were still moist and delicious.