A wedding cake can sit out for several hours or even days, depending on the recipe and ingredients used. It's best to follow the recommendations of the baker or chef to ensure the freshness and quality of the cake on the wedding day.