The transverse momentum spectra of D0 mesons from b hadron decays are measured at midrapidity (|y|<1) in pp and Pb-Pb collisions at a nucleon-nucleon center of mass energy of 5.02 TeV with the CMS detector at the LHC. The D0 mesons from b hadron decays are distinguished from prompt D0 mesons by their decay topologies. In Pb-Pb collisions, the B→D0 yield is found to be suppressed in the measured pT range from 2 to 100 GeV/c as compared to pp collisions. The suppression is weaker than that of prompt D0 mesons and charged hadrons for pT around 10 GeV/c. While theoretical calculations incorporating partonic energy loss in the quark-gluon plasma can successfully describe the measured B→D0 suppression at higher pT, the data show an indication of larger suppression than the model predictions in the range of 2<pT<5 GeV/c.