The quick answer is 12-17 percent moisture content in your wood. A longer explanation is the dryer the wood is the more stain the wood will absorb and the more it absorbs the longer the stain will last on your deck or fence. It is possible to stain a piece of new pressure treated wood, however the wood is already full of treatment and the wood has no more room left to absorb the stain. It doesn’t take that long for a deck to dry down to the proper percentage. In the heat of the summer it may only take a day and in spring/fall and couple days.