You should accede to the request, but make it clear that what you write is likely to be less helpful than if you were writing a bespoke reference sent to the relevant institution directly and confidentially.
In the UK, we would call this a request for an "open reference" -- that is, a reference which the candidate can see and is at liberty to forward where he/she wishes. Some people publish "open references" on their online profiles. You should consider carefully what you write in an "open reference", since your comments and reputation may end up far more public and be remembered for far longer than would be the case for a bespoke and/or confidential reference.
As a result of this consideration, an "open reference" tends to be more generic (because it is not tailored to a specific application) and focus on facts. Given that many academic institutions want a referee's detailed evaluation of a candidate (rather than confirmation that the candidate was at X during yyyy–yyyy), this makes the "open reference" a disadvantageous medium. In any case, praise in an "open reference" might not be taken as seriously as in a bespoke and/or confidential reference.
[Possible exception: if you are a notable authority and your praise is very strong (e.g.:
"Josephine Bloggs is the finest young physicist I have ever taught, and I have no doubt that her pioneering work will soon make my theories of relativity obsolete." -- Prof. Albert Einstein
), the fact that you are happy for it to be published all over the world wide web might work in the candidate's favour.]