In the theory of radiation emitted by bunches of charged particles, the effects of coherence are commonly taken into account by multiplying the intensity of radiation generated by a single particle by the form factor of the bunch, which depends on its size, shape, and particle distribution. Here, it is demonstrated that this approach is, generally speaking, incorrect for polarization radiation from a wide class of structures like photonic crystals and metasurfaces. The theory of coherent Smith-Purcell radiation from such structures has been developed. It is shown that the commonly accepted approach is applicable only under two conditions: (i) the observation point lies in the plane containing the trajectory of the bunch and the normal to the surface of the target, and (ii) the radius of the bunch is much smaller than the effective range of the Coulomb field of the moving electrons.