The exact thickness depends on material and jurisdiction you're in. In general, OSHA mandates at least a 1/4" thickness for the top rail and midrail of a guardrail system.  The most common guard railing material is 1.90” O.D. tubing or 1 ½” pipe.