Yews have long been associated with religious worship. So it is likely that churches were originally built near the sacred trees rather than the other way round.
These trees live longer than any other species in Europe and can grow to an enormous size. Many are thought to be well over 1,000 years old. Yews were revered by the druids of ancient Britain, France, and Ireland and not doubt early Christian missionaries preached in the shelter of the trees before their first churches were built. Hywel Dda-Howell the Good-a Welsh king, who reigned in the 10th century, set a special value on ‘consecrated yews’.
Some yews are even older than the ancient churches beside them, suggesting that the church was built on a spot already devoted to worship. The association continued, and it became traditional for yews to be planted in churchyards.
Also the great age to which yews live caused them to be regarded as a symbol of immortality and, therefore, associated with death, as man only becomes immortal after he dies.
Another theory is that yews were planted in churchyards so that they might provide wood for the longbows of medieval archers.