We study numerically the critical behavior at the localization transition in the Anderson model on infinite Bethe lattice and on random regular graphs. The focus is on the case of coordination number m +1 =3 , with a box distribution of disorder and in the middle of the band (energy E =0 ), which is the model most frequently considered in the literature. As a first step, we carry out an accurate determination of the critical disorder, with the result Wc=18.17 ±0.01 . After this, we determine the dependence of the correlation volume Nξ=mξ (where ξ is the associated correlation length) on disorder W on the delocalized side of the transition W <Wc , by means of population dynamics. The asymptotic critical behavior is found to be ξ ∝(Wc-W ) -1 /2 , in agreement with analytical prediction. We find very pronounced corrections to scaling, in similarity with models in high spatial dimensionality and with many-body localization transitions.