Undoped ZnO and B-dopoed ZnO (BZO) thin films with 0 to 2.5 at.% B were prepared by using sol-gel synthesis. Their optical and electrical properties and surface morphology were investigated using scanning electron microscopy, photoluminescence (PL), and van der Pauw Hall-effect measurements. All of the thin films were deposited appropriately onto quartz substrates; they exhibited a fibrous root morphology, with structures that changed in size with increasing B concentration. The PL spectra showed near-band-edge (NBE) emissions and deep-level emissions (DLE). The NBE emission and the DLE for the BZO thin films were more blue-shifted than those for the undoped ZnO thin film, and the blue shift increased the efficiency of the NBE emission of the BZO thin films. The Hall-effect data suggested that B doping also improved the electrical properties, such as the carrier concentration, Hall mobility, and resistivity, of the thin films. The resistivity and the Hall mobility decreased with increasing B concentration and were inversely proportional to the carrier concentration.