Ecological communities are characterized by the abundance of each species. Understanding the environmental conditions that influence the abundance of each species is important to determine how ecological communities will respond to environmental change. Most ecological communities contain a large number of species and, therefore, summarizing species-specific responses is challenging when trying to communicate to policymakers how the community will respond to environmental change. We propose a joint species distribution model that exploits the ecological guild concept and provides a data-driven approach to reduce the number of model parameters. Specifically, within a hierarchical Bayesian framework we develop a latent regression tree that partitions species into homogeneous groups that respond similarly to environmental covariates (i.e., ecological guilds). Our approach was motivated by the need to understand and communicate to policymakers the hydrological variables (e.g., water velocity, temperature) that influence fish communities within the Upper Mississippi River using the data from a long-term resource monitoring program.