We propose efficient and accurate numerical methods for computing the ground state and dynamics of the dipolar Bose-Einstein condensates utilising a newly developed dipole-dipole interaction (DDI) solver that is implemented with the non-uniform fast Fourier transform (NUFFT) algorithm. We begin with the three-dimensional (3D) Gross-Pitaevskii equation (GPE) with a DDI term and present the corresponding two-dimensional (2D) model under a strongly anisotropic confining potential. Different from existing methods, the NUFFT based DDI solver removes the singularity by adopting the spherical/polar coordinates in the Fourier space in 3D/2D, respectively, thus it can achieve spectral accuracy in space and simultaneously maintain high efficiency by making full use of FFT and NUFFT whenever it is necessary and/or needed. Then, we incorporate this solver into existing successful methods for computing the ground state and dynamics of GPE with a DDI for dipolar BEC. Extensive numerical comparisons with existing methods are carried out for computing the DDI, ground states and dynamics of the dipolar BEC. Numerical results show that our new methods outperform existing methods in terms of both accuracy and efficiency.