Blast out leaves and other debris from between the planks using the garden hose. Mix 1-part bleach with 4 parts water and scrub all black mildew spots. For tougher stains, mix 1 cup trisodium phosphate with 1 cup bleach into a gallon of water. Scrub, then rinse after 15 minutes.
Mix 4 oz. of acid-based stain remover with 1 quart of water and scrub the discolored spots around corroded nails. Also, scour away any dark stains caused by wood extracts and any gray areas from UV discoloration. Use goggles and rubber gloves for protection against the harsh chemicals.
Scrub the deck thoroughly with a stiff brush and a deck cleaner, one small area at a time and rinse. Use a putty knife to remove stones embedded in the wood or between the boards. Let the deck dry several days before applying a finish.
Seal off the edges you don't want painted with blue painter's tape. This produces straight lines and protects the trim, stucco, siding or brick that is to remain unpainted. Lay down plastic tarp over walkways.
Apply a stain blocking primer to the deck before painting. Use angled and straight brushes as necessary to get between individual boards, and use rollers to cover large areas. Use a paint that is water repellent or waterproof. Also, be sure the paint offers UV protection.