We present a coarse-grained lattice model to study the influence of water on the recognition process of two rigid proteins. The basic model is formulated in terms of the hydrophobic effect. We then investigate several modifications of our basic model showing that the selectivity of the recognition process can be enhanced by considering the explicit influence of single solvent particles. When the number of cavities at the interface of a protein-protein complex is fixed as an intrinsic geometric constraint, there typically exists a characteristic fraction that should be filled with water molecules such that the selectivity exhibits a maximum. In addition, the optimum fraction depends on the hydrophobicity of the interface so that one has to distinguish between dry and wet interfaces.