Diagonal lines are much stronger compositional elements than lines that cross an image vertically or horizontally. They draw the eye through the image, intersect other lines and objects and tend to create depth and perspective.
Once again, this is a general principle and not a "rule". Diagonal lines may be implied or real lines - that is, as implied lines, they may not actually exist! The lines are implied by the placement of various elements within the composition or subject of the image. Landscape photographers look for paths and fences, or particular contours, but the general shape of the subject may be all that suggests a diagonal line. In the image on the left there are no paths or fences, just a feeling that the landscape falls away to the right broadly following a diagonal line.
Diagonal lines may introduce a feeling of action, movement or flow and hence give an image a more dynamic feel. The eye tends to follow such lines - whether real or implied. In a portrait, the direction of a subject's gaze provides a powerful implied line that can be positioned diagonally by careful framing or by directing the subject. The reason for this interest in diagonals remains a matter of opinion, but an explanation is probably hidden somewhere deep inside the human mind.
Vertical and horizontal lines, whether real or implied, generally work less well in an image. A human subject photographed full length and standing upright is unlikely to make a good image, but if the same person can be positioned diagonally in the frame the chances of achieving an interesting composition may be better. In close-up portraits it is often best to position the subject's limbs diagonally - or at least avoid a straight up and down composition.
Some photographers argue that people are trained to explore an image from left to right, so a diagonal line that leads the eye from the top or bottom left to the bottom or top right might be ideal. However there are countless other factors, and elements of composition, that may also have a significant or greater effect.
Converging diagonal lines, or those leading in different directions, may lead the eye to a point of intersection and can consequently be used as an effective element of composition. However too many real or implied directions may lead to confusion in the mind of the viewer.