Assuming you are talking about cleaning varnished wood railings:
To remove surface dirt and grime, use a soft cloth dampened with water and mild dish soap. Gently rub the railing in the direction of the grain. Rinse the railing with clean water and dry it with a soft cloth.
For tougher stains, mix equal parts white vinegar and water in a bucket. Soak a sponge or soft brush in the mixture and scrub the railing. Rinse away the cleaner with clean water and dry the railing.