Distributed hybrid renewable energy is a promising technology for addressing environmental and energy issues, and its performance and system configuration play an essential role in the application. However, the contribution of energy sharing among buildings in building groups to the matching performance has yet to be fully explored. This study established a joint MATLAB-TRNSYS optimization model for the hybrid PV/wind building system to investigate the matching performance of energy consumption in building groups and energy production in PV/wind systems. The optimal system configuration for three objectives, technical, economic, and environmental, was also studied using the multi-objective particle swarm algorithm. Several factors influencing system performance and configuration were considered: renewable energy hybrid, a hybrid of different buildings, intensity of energy use and energy resource, and economic parameters. The results reveal that a hybrid system outperforms a single system, particularly a PV system with a smaller roof area and less installed capacity. Additionally, wind turbines contribute more to system performance than PV panels. Mixing buildings with different heights and functions could also improve system performance by renewable energy sharing in most instances, except multi-story office buildings. Increasing wind resources improves system performance more than solar resources, and increasing energy use intensity negatively impacts system performance for residential buildings but is beneficial for office buildings. Higher grid prices and feed-in tariffs can bring more economic benefits. This study revealed the contribution of energy sharing among different buildings, which could support better application of distributed hybrid renewable energy systems in complex urban environments.