The best time to stain your deck is either the spring or the fall.
If you stain your deck in the summer, make sure you do it out of the direct sunlight. Applying a deck stain in direct sun will cause the stain to dry to quickly and can result in premature stain failure. In the summer, stain your deck in the morning or evening so the deck surface isn’t too hot. Remember, the surface temperature of the deck can be much hotter than the air temperature.
It's not easy to predict the weather, but be sure to check for rain ahead of your project timeline. Rain will wash away stains that have not yet dried completely.