If your kitchen isn't too warm, you can leave carrot cake (or this carrot cake bread) out overnight, but not any longer than that. The sugar will help preserve the cream cheese frosting for a short amount of time, but beyond that, it will need to be refrigerated.