IIRC this is actually one of the plot points in the Three Body Problem, where they used the sun to send out a signal and make first contact with an alien civilization.
This is like chapter ~one of book one (if you skip over the tangential Chinese politics stuff that I didn't understand on my second read either), so not really a spoiler. In the book it's some magic amplification that happens inside the sun, not based on a physical effect we've actually observed in real life as far as I know.
In this case, it's about gravitational lensing (when using the sun) and additionally atmospheric refraction (when using the earth; terrascope).
I'm also not sure we could use this, as in 3BP, to send anything. What this does is collect light rays coming in essentially parallel and focus it on a line along which we can place a detector. If we emit from somewhere along that line, it would be scattered as a ring the size of the lens (the earth or sun, in the examples, plus whatever altitude we use to avoid clouds or corona) because the rays are basically parallel from there. At least, that's my guess. I didn't understand even what my high school teacher tried to explain about lenses so this is speculation based on a drawing I saw in the terrascope video linked elsewhere in the thread (https://www.youtube.com/watch?v=jgOTZe07eHA).
So even if we'll live to see this project funded, started and launched, there's pretty much no way we'll still be alive once the sensor probe reaches it's duty station.
Also, the telescope will be pretty much purpose build to look at one thing. Swiveling the telescope to look at something different or to track a moving object involves moving the sensor probe millions of kilometers across space.
https://en.wikipedia.org/wiki/Breakthrough_Starshot
and if you built some kind of "gun" that can shoot those things you could should numerous ones out in different directions to observe different targets and definitely have results in years if not weeks instead of decades.