Paint always provides the most protection against UV light and rain, but on surfaces such as decks that can’t be totally sealed off from water penetration, a stain is best because it doesn’t peel. And except for marine varnishes, clear coatings have very limited effectiveness against sunlight.