I've heard the phrase "miles better than…" being used. A quick Google search will return results for "miles better than…", but there's no result where the phrase "light years better…" has been used.
As both are a unit of measuring distance, can "light years better…" be used as it is analogous to "miles better…" or is "light years ahead…" the only acceptable way?
Learn English – Usage of “light years better…” over “light years ahead…”
idioms
Best Answer
Both miles and light years are measures of distance and therefore 'ahead' is the most appropriate usage. However we do say 'far better' where far is admittedly a substitute for 'a lot' and no reference to distance anyway.
Thus 'miles better' is just another way of saying 'much better' or 'far better' and your argument for using 'light years better' instead of 'miles better' is actually valid -- moreover if you were to say 'light years better' rather than 'light years ahead' it would be grammatical and might even remain idiomatic; and I am sure your listener would get the correct meaning.
Having said that, let me remind you that 'light years ahead' is usually used as a measure of progress:
Literally, ELU has progressed far ahead of others, by a measure of light years (hyperbolic, as already noted in an earlier answer) and that is a sound reason to use 'ahead' in preference to 'better' in such a construction.