If you plan to stain your deck and it rains on the deck and the deck becomes wet you should wait at least 48 hours to allow the deck to dry out fully before applying the deck stain to your deck.
Applying the deck stain any sooner then the deck boards will have absorbed the rain water and the deck stain won't be sucked up by the deck boards so that's why it's important to let the deck boards dry out fully so that the deck boards will be thirsty enough to suck up the deck stain to give the deck a great finish.