Rural communities in China are currently confronting persistent socio-economic and demographic pressures, making the pursuit of long-term sustainability increasingly essential. Enhancing community resilience is widely recognized as a core pathway toward sustainable rural development, yet the socio-psychological mechanisms through which rural public spaces contribute to this process remain underexplored. This study proposes an environmental perception → psychological identity → community resilience framework to clarify how public spaces support sustainable community development. Using survey data from 283 residents across five villages in Zhejiang Province and employing PLS-SEM for empirical analysis, we find that positive perceptions of public spaces significantly enhance community resilience both directly and indirectly through cultural identity and place attachment. A sequential mediation effect is also observed: environmental perception strengthens cultural identity, which subsequently deepens place attachment, jointly promoting resilience. These findings reveal that rural public spaces function as socio-cultural infrastructures that cultivate emotional bonds and collective identity, thereby generating key components of social sustainability. The study contributes to sustainable rural planning by demonstrating that improving public space quality and reinforcing place-based identity processes are vital strategies for fostering resilient and sustainable communities.