A theoretical approach based on coupled-mode theory is presented in order to determine the radiation pattern of LEDs incorporating a shallow photonic crystal. From this, a fundamental limit for the directionality of the diffraction of a single guided mode is given. Additionally, the Fabry-Perot resonances are shown to have significant impact on the directionality of diffracted light. For a realistic green-emitting InGaN LED in thin-film configuration the optimum reciprocal lattice vector is derived in terms of absolute diffracted intensity and directionality within a limited acceptance angle. The latter can be as high as 1.8 times the directionality of a Lambertian emitter. Furthermore, the spontaneous emission distribution between guided modes heavily influences the diffracted intensity.