Three-dimensional (3D) helical mesostructures are attractive for applications in a broad range of microsystem technologies, due to their mechanical and electromagnetic properties as stretchable interconnects, radio frequency antennas and others. Controlled compressive buckling of 2D serpentine-shaped ribbons provides a strategy to formation of such structures in wide ranging classes of materials (from soft polymers to brittle inorganic semiconductors) and length scales (from nanometer to centimeter), with an ability for automated, parallel assembly over large areas. The underlying relations between the helical configurations and fabrication parameters require a relevant theory as the basis of design for practical applications. Here, we present an analytic model of compressive buckling in serpentine microstructures, based on the minimization of total strain energy that results from various forms of spatially dependent deformations. Experiments at micro- and millimeter-scales, together with finite element analyses (FEA), were exploited to examine the validity of developed model. The theoretical analyses shed light on general scaling laws in terms of three groups of fabrication parameters (related to loading, material and 2D geometry), including a negligible effect of material parameters and a square root dependence of primary displacements on the compressive strain. Furthermore, analytic solutions were obtained for the key physical quantities (e.g., displacement, curvature and maximum strain). A demonstrative example illustrates how to leverage the analytic solutions in choosing the various design parameters, such that brittle fracture or plastic yield can be avoided in the assembly process.