We present results from two-dimensional computer simulations of shearing granular layers, using a discrete element code, and applying a wide range of boundary conditions. We specifically investigate the distribution of shear within the granular layer and find two different modes of localization depending on the applied shear velocity, pressure, and layer thickness: (1) granular layers that develop a persistent shearing boundary region (“fluidlike” behavior) and (2) layers that switch between diffuse deformation and randomly positioned internal shear bands (“solidlike” behavior). The two end-member deformation modes can be found in laboratory experiments performed under low and high confining pressure, respectively. Micromechanical investigation reveals two different statistical distributions of the grain contacts correlating with the two different shearing modes. These results imply that rehological transitions in granular flow modes are linked to quantifiable microtstructural organization.