We study exclusive heavy flavor vector meson production in diffractive deep inelastic scattering and ultra-peripheral heavy-ion collisions within the dipole picture. We obtain the mass spectrum and light-front wavefunctions of heavy quarkonium from the basis light-front quantization approach, using the one-gluon exchange interaction plus a confining potential inspired by light-front holography. We apply these light-front wavefunctions to exclusive charmonium and bottomonium production. The resulting cross sections are in reasonable agreement with electron-proton collision data at HERA and ultra-peripheral nucleus collision measurements at RHIC and LHC. The heavy quarkonium cross-section has model dependence on dipole model. We observe that the cross-section ratio of excited states to the ground state has a weaker dependence than cross-section itself. We suggest that measurements of excited states of heavy quarkonium production in future electron-ion collision experiments will impose rigourous constraints on heavy quarkonium light-front wavefunctions, thus improving our understanding of meson structure, which eventually will help us develop a precise description of the gluon distribution function at small-$x$ regime. This work was supported in part by the Department of Energy under Grant Nos. DE-FG02-87ER40371 and DESC0008485 (SciDAC- 3/NUCLEI).