The wood needs to be dry enough before staining. You can determine your wood's moisture level by putting a little water on it. If it soaks through, you are good to go. If you don't wait for a sufficient amount of time, the stain will not bond to the wood and will peel.