Generally, the drier the better. But you can apply exterior stains to wood with as much as 15% moisture. Allowing the wood to dry for a week should take care of it. The good news is the stain will allow the wood to breath and excessive moisture will be able to evaporate.
Staining the structural wood prior to assembly is a great idea that will allow you to evenly cover all surfaces. As long as the wood isn't physically wet you shouldn't have any problems.