Wine is stored in either barrel or tank in an oxygen-free or “reductive” environment. When wine is transferred from tank/barrel to bottle, it picks up oxygen which creates compounds that act like a layer or blanket on top of the wine, muting its flavors. As well, filtration can break up phenolics that then need to coalesce again in the bottle. So, depending on the wine, getting through bottle shock takes anywhere from 4-6 weeks for light whites to 3-4 months for big reds (more on this below).
While red wines take longer to move through bottle shock, high-quality reds that will age well also benefit from additional time in the bottle to develop mid-palate complexity and bottle bouquet. A good rule of thumb for high-quality Napa Cabernet is a good year in bottle before opening. Certain vintages, like Napa Valley Cabernet in 2013, are powerfully structured and are significantly benefitted by 3-4 years in bottle. It doesn’t mean you can’t drink and enjoy them before then; however, you are likely missing out on considerable complexity and approachability by not doing so.