We study the (hyper)polarizabilities of a singlet diradical molecule (2-borapropane-1,3-diyl) which contains a boron atom. For the purpose to control the (hyper)polarizabilities by tuning the diradical character of the boron compound, we employ water solvent as an electron donor to the boron atom. A series of quantum chemical calculations reveal that the electron donation from the lone pair of electrons in a water molecule to the vacant p orbital of boron atom gives rise to the increase of the diradical character, leading to the large variation of the polarizability of the molecule. We also investigate the solvation effects of the bulk water by utilizing the polarizable continuum model (PCM). It is shown that the PCM environment significantly increases the degree of enhancement of the second hyperpolarizability in the intermediate diradical regime of the compound. These results suggest that a singlet diradical boron compound immersed in an electron donor solvent can exhibit efficient third-order nonlinear optical properties, which can be tuned by designing the solute-solvent interactions. We examine the reliability of the PCM results by performing the additional QM/MM simulations. It is found that the QM/MM solvation effects slightly decrease the polarizability in contrast to the PCM calculation, which implies the possibility that PCM tends to overestimate the polarizability due to the lack of the ability to represent the solvation structures.