Bacterial biofilms underlie many persistent infections, posing major hurdles in antibiotic treatment. Here we design and demonstrate 'tug-of-war' optical tweezers that can facilitate the assessment of cell-cell adhesion-a key contributing factor to biofilm development, thanks to the combined actions of optical scattering and gradient forces. With a customized optical landscape distinct from that of conventional tweezers, not only can such 'tug-of-war' tweezers stably trap and stretch a rod-shaped bacterium in the observing plane, but, more importantly, they can also impose a tunable lateral force that pulls apart cellular clusters without any tethering or mechanical movement. As a proof of principle, we examined a Sinorhizobium meliloti strain that forms robust biofilms and found that the strength of intercellular adhesion depends on the growth medium. This technique may herald new photonic tools for optical manipulation and biofilm study, as well as other biological applications.