Tangents occur where two lines touch each other. They are of course essential in mathematics. But in painting they can cause all kinds of problems and can ruin your painting. If two lines meet in a composition the viewer can become confused with the ambiguity. Let's say you want to draw or paint a tree in front of a fence. Don't place it here alongside the fence post as this will confuse your viewers.  

I think a safe rule would be, when in doubt overlap. Try to avoid point to point touching.

Everything I have said about tangents in paintings applies in photography. You can ruin a good photo with tangents.      

If you are learning to paint and want to know more about Troublesome Tagents in paintings please go to the excellent site of Marc Dalessio which has examples of bad alignments and how to fix them.