If the blocks have never been painted or sealed before, a coat of primer is necessary before painting. Cement, or cinder, blocks are very porous and will quickly absorb paint. The right primer will seal the pores of the blocks so that the paint remains on the surface, which prevents streaky, uneven color. Primer also helps the paint adhere tightly to the block so that the paint will look nice for much longer.
Block fences that have previously been painted may not need a coat of primer if the paint is still in fairly good shape. Any places where the paint has chipped or peeled away should be primed. Paint can be applied directly to the rest of the fence without primer. Primer may be a good idea if the paint color is changed drastically, which will reduce the number of coats of paint necessary to cover the old color. A coat of primer is necessary if the old paint is in bad shape and must be scraped off or removed. After removing the old paint, primer should be applied before the paint.
Primer should be used on a newly-constructed fence prior to painting, but wait at least 30 days for the mortar to completely cure before painting. If conditions are hot and dry, 30 days should be sufficient and a coat of primer can be applied prior to painting. If conditions have been cool and moist, wait up to 60 days for the cement to cure and dry. Moisture in the mortar could cause the paint job to fail even with proper preparation, such as priming.
Since primer is the foundation of a paint job, the proper type of primer must be used on block fences, or the paint may not last long. The label on the primer should state that it is designed specifically for concrete, masonry or block. Acrylic primer should be used with latex paint and oil-based primer with oil-based paints. If the fence has been previously painted and the paint is not being removed, you'll need to determine the type of paint to know what kind of primer to use.