Bryophytes and lichens are the most species-rich groups of epiphytes in temperate forests. They colonise different tree species that create a wide variety of microhabitats, and conditions in these microhabitats are modulated by different factors. We assessed drivers that create and maintain epiphyte species richness and diversity of bryophytes and lichens along tree species composition gradients. We hypothesised that tree species composition influences the diversity of lichens and bryophytes. The study was conducted on 31 plots along the Kudowski Potok River (SW Poland). Each plot was a 500 m2 circle (r = 12.62 m), along the banks of the stream. These sites are among the best-preserved remnants of a mountain landscape with a high diversity of forest types, representing a transition from the planted Picea abies secondary communities to broadleaved forests (potential natural vegetation). We analysed the tree species composition gradient using PCA, and we measured diffuse light availability. We assessed differences in epiphyte species richness among tree species using generalized linear mixed-effects models and species composition gradients of epiphytes using redundancy analysis. We found that tree species composition and light availability affected the composition of both bryophyte and lichen species. Moreover, lichen and bryophyte species richness were positively correlated. Broadleaved trees such as Acer pseudoplatanus and Fraxinus excelsior clearly increase the number of epiphytic bryophytes and lichen species in spruce stands. Deciduous trees left in management forests serve as a reservoir for epiphytic bryophytes and lichens. Our results indicate the importance of refuges composed of diverse deciduous trees that increase the biodiversity in commercial forests.