To the lighting circuit. Or a fused spur from a socket circuit. Either is perfectly acceptable and perfectly legal. The lighting circuit is better, more normal, as people expect lights to be on a lighting circuit.
The legality issue I mentioned is that this is notifiable work, and so strictly speaking must either be done by a registered electrician who can self-certify compliance with the Building Regulations, and notify Building Control after the event, or it must be notified to them in advance, and a fee paid to them etc.
Nobody can advise you to ignore the law, but if you search this forum you will find plenty of people pointing out that the chances of being caught fitting an illuminated mirror in your bathroom are pretty small.
Is the transformer separate, or built into the mirror?
OK - so that means running mains cables from the existing lighting circuit to the mirror.
Given the extra risks of electricity in bathrooms, then legal niceties aside, if you're not confident that you can do this safely please call an electrician.
If you need to find a tradesperson to get your job done, please try our local search below,
or if you are doing it yourself you can find suppliers local to you.
Select the supplier or trade you require, enter your location to begin your search.
Please select a service and enter a location to continue...
Are you a trade or supplier? You can create your listing free at DIYnot Local