Events with low probability and high impact, which annually cause high damages, seriously threaten the health of the distribution networks. Hence, more attention to the issue of enhancing network resilience and continuity of power supply, feels more than ever, all over the world. In modern distribution networks, because of the increasing presence of distributed generation resources, an alternative way for load supply and enhance network resilience, is use of distributed generation resources during failure occurrence on the main network. In this paper, first, the resilience concept and modeling the natural disasters including flood and storm in the presence of distributed generation resources is presented. Then in order to study the impact of distributed generation resources on resilience of the distribution network, a new index based on resilience for the load supply and resilience of distributed generation sources, including solar cells and conventional gas-fired sources, is formulated, and the resiliency index of the network is achieved in the presence of these resources. Ultimately, using genetic algorithm as a tool for optimization, with the aim of enhancing the network resiliency, we attempt to solve the optimal distributed generation planning problem that means determination the optimal type, site of available capacity of these sources, and the performance of the proposed approach is illustrated by numerical studies on a typical distribution network.