Old decks have different needs than new ones. Wood that is already cracked or cupping may look good with a coat of stain, but if you want to maximize the life of the deck, consider using a heavy-duty deck enamel or a paintable plastic or epoxy coating that will fill cracks and make it look new again. A highly pigmented coating like enamel will also prevent further UV deterioration and protect against rot and mildew, especially if you add a mildewcide. Plastic coatings are relatively new to the market and can be applied as easily as paint.
Obviously if the deck has a previous finish on it that is chipping or flaking off, the old finish will have to be scraped and sanded before applying the new one. The condition of the old finish may require the use of a heavy enamel or plastic to cover it up.
If your deck is in a sunny location, then a highly pigmented stain or enamel will guard against UV rays more effectively than a transparent finish. Either of these can be color-matched to your house. Wet locations subject to pests and mildew are good places to use enamel that has been treated with chemicals to abate them. Since wet decks are slippery decks, it’s also a good thing to include sand or commercially available traction additives in the paint mixture. Heavier coatings like enamel are more amenable to these types of additives than stains.
Oil-based products penetrate more deeply into wood and give better protection, but they are more difficult to clean up than water-based ones. Latex and other water-based finishes will adhere to wet surfaces while oil-based ones will bubble up and create a mess. When using either latex or oil paint, it is advisable to use a primer first, especially on new decks. This will ensure uniformity of color at the end of the job.
If your deck is new or in relatively new condition, you may want the natural look that varnish, oil or sealer can provide. Just be sure that UV deterioration is not going to be a problem, which it will be if the deck is in direct sunlight for a significant part of the day. If your deck is in the sun and you want a clear finish, consider using spar varnish or paintable plastic