We study exclusive charmonium and bottomonium production in ultraperipheral heavy-ion collisions and electron-ion collisions within the dipole picture. We employ heavy quarkonium light-front wave functions obtained within the basis light-front quantization framework, which has some features of the light-front holographic QCD. We focus on comparison with measurements of exclusive charmonium and bottomonium production in ultraperipheral pp, pPb, and PbPb collisions at the CERN Large Hadron Collider and find reasonable agreement with the cross sections. We also discuss the coherent production cross-section ratios of excited states to the ground state for charmonium and bottomonium, which exhibit insensitivity to the dipole model parameters. We show that electron-ion collisions provide an opportunity for a quantitative study of heavy quarkonium structure.