How to figure out if the reaction proceeds via SN1 or SN2 mechanism?
As you have the information that the yield depends on solvent polarity. It is the key point to be considered in analysis of type of reaction. In case of a $\ce{S_{N}1}$ reaction, the polar solvent favors the reaction. $\ce{S_{N}1}$ is a two stepped reaction, in which the 1st step is carbocation formation, such that there appears the dipole dipole interaction between the carbocation and polar solvent which favors the reaction.

Whereas in the case of $\ce{S_{N}2}$ reaction, the dipole dipole interaction develops between polar solvent and the nucleophile rather than with intermediate product. It is because the charge is dispersed in two centres in intermediate while charge is centered in single center in nucleophile. This deactivates the $\ce{S_{N}2}$ reaction and the reaction cannot proceed forward smoothly.

Since you have another specific information that the higher the solvent polarity, the higher the yield. Since higher solvent polarity favors the $\ce{S_{N}1}$ reaction, the higher will be the yield through a $\ce{S_{N}1}$ mechanism. So the reaction with tendency with higher solvent polarity and higher yield is a $\ce{S_{N}1}$ reaction.