We present new optical (B,V,R,I) and radio (at 14.5, 8.5, and 4.8 GHz) observations of the γ-ray-loud blazar AO 0235+164 obtained during the high state of 1997 December-1998 January. The data were combined with historical light curves from the literature to study correlated optical and radio variations over a time span of more than 20 years. Flux variability with large and energy-dependent amplitude is observed at both wave bands, with the source varying over all timescales sampled (years-months-days), in agreement with previous reports. We have performed a cross-correlation analysis of optical and radio light curves applying various detailed statistical methods. The principal results of our analysis can be summarized as follows: (1) we find that the optical and radio variations exhibit correlated flux changes at their average level, stressing the conclusion that the same emission mechanism is responsible for the radiation in the two bands (i.e., synchrotron emission from shocked plasma in the jet). However, as previously reported, a few strong flares at optical do not have obvious counterparts at longer wavelengths, possibly indicating that an additional component is present in the optical (e.g., microlensing), or, alternatively, rapid cooling of the synchrotron particles in a radiative shock. (2) Periodic variations are observed at radio frequencies (14.5 and 8.0 GHz) with a pattern repeating every ~5.8 years, as indicated by the Lomb-Scargle periodogram. This is the first report for periodicity at radio wavelengths for this source; future continuous monitoring is needed to confirm this result. (3) Through the analysis of B-V and R-I slopes, we observe large spectral variations, with a bimodal behavior. In the first state, the emission is consistent with a variable power law all across the sampled optical region (from R to V bands); in the second state, the R-I slope is constant while the B-V slope varies, i.e., the continuum has various degrees of curvature at the shorter wavelengths. In general, the power-law slope is not correlated with the flux of the source. However, there is an indication that when the source is in the first state, the spectrum becomes softer as the source brightens.