I know that, in Cardcaptor Sakura, Yue starts needing more magic after Sakura collects all of the cards, which begins to negatively affect Yukito. Toya gives his magic to Yue to save Yukito. How does he pass the magic on? It makes sense that Sakura would have a connection to him, considering that both of them are connected to the cards, but why would Toya have a connection that allows him to give his magic to Yue?
I don't know the how part since in the anime, it was when Yukito was slowly vanishing due to his lack of powers and that's when Touya admitted to Yukito that he knows about his alter-ego (Yue) and his need for power. If I remember correctly, Yue appeared after that then Touya gave his power to him, sacrificing his ability to sense danger and see poeple who has passed away like their mom Nadeshiko. Touya just fainted after that. It happened on this episode. I haven't seen the manga so I probably missed something on the how part (if a ritual was done to transfer Touya's powers to Yukito).
With regards to Touya having the powers to be able to maintain Yue's power, remember that in the manga
Sakura's father, is one of Clow Reed's reincarnation (the other is Eriol). So Touya probably inherit his magical powers or spiritual awareness from him. Though this fact was completely removed from the anime, though it can only be the reason for Touya having such powers.