Dynamical state of galaxy clusters is closely related to their observational properties in X-ray, optical and radio wavelengths. We develop a method to diagnose the substructure and dynamical state of galaxy clusters by using photometric data of Sloan Digital Sky Survey (SDSS). To trace mass distribution, the brightness distribution of member galaxies is smoothed by using a Gaussian kernel with a weight of their optical luminosities. After deriving the asymmetry, the ridge flatness and the normalized deviation of the smoothed optical map, we define a relaxation parameter, {Gamma}, to quantify dynamical state of clusters. This method is applied to a test sample of 98 clusters of 0.05