Is it wrong to use legacy to get into top schools?

It probably helps a bit if the stats are at least above the 25th percentile on the CDS. It won’t help if the balance of the application is sub-par, IMO, unless the legacy is also tied with a major donation or some other hook.