Astronomical cycles recorded in stratigraphic sequences offer a powerful data source to estimate Earth’s axial precession frequency k, as well as the frequency of rotation of the planetary perihelia (gi) and of the ascending nodes of their orbital planes (si). Together, these frequencies control the insolation cycles (eccentricity, obliquity and climatic precession) that affect climate and sedimentation, providing a geologic record of ancient Solar system behavior spanning billions of years. Here we introduce two Bayesian methods that harness stratigraphic data to quantitatively estimate ancient astronomical frequencies and their uncertainties. The first method (TimeOptB) calculates the posterior probability density function (PDF) of the axial precession frequency k and of the sedimentation rate u for a given cyclostratigraphic data set, while setting the Solar system frequencies gi and si to fixed values. The second method (TimeOptBMCMC) applies an adaptive Markov chain Monte Carlo algorithm to efficiently sample the posterior PDF of all the parameters that affect astronomical cycles recorded in stratigraphy: five gi, five si, k, and u. We also include an approach to assess the significance of detecting astronomical cycles in cyclostratigraphic records. The methods provide an extension of current approaches that is computationally efficient and well suited to recover the history of astronomical cycles, Earth-Moon history, and the evolution of the Solar system from geological records. As case studies, data from the Xiamaling Formation (N. China, 1.4 Ga) and ODP Site 1262 (S. Atlantic, 55 Ma) are evaluated, providing updated estimates of astronomical frequencies, Earth-Moon history, and secular resonance terms.