The effect of a magnetic field on single-bubble sonoluminescence in water reported experimentally by Young, Schmiedel, and Kang [Phys. Rev. Lett. 77, 4816 (1996)] is studied theoretically. It is suggested that bubble dynamics is affected by the magnetic field because moving water molecules of the liquid suffer torque due to the Lorentz force acting on their electrical dipole moment, which results in the transformation of some of the kinetic energy into heat. It is shown that the magnetic field acts as if the ambient pressure of the liquid were increased. It is suggested that the effect increases as the amount of the liquid water increases. It is predicted that nonpolar liquid such as dodecane exhibits no effect of the magnetic field.