The is Yin/Yang on the Campaign and Yin/Yang in battles. These are separate things. Yin/Yang on the Campaign map balances out your building selection, technology, and lord traits/types to give buffs/debuffs to one side or the other or finding a balance between the two.
When an imbalance is created, such as too much Yin, it suffers debuffs (loss of control and income from Yin buildings).
Within battle, Yin/Yang units being near each other gives them buffs. From what I have seen, the range is 45 yards.