Easy way: Using what the browsers offer
In Firefox, dragging & dropping a link to the desktop creates a shortcut in Windows 7. I'm sure all or most major browsers can do this on most platforms. Just point your users to the right direction, maybe by offering them custom step-by-step instructions.
You can style the link as a huge area easy to recognize, drag and drop. No need for it to be just an underlined piece of text.
This is, in my opinion, the only worthwhile way to go.
Hard way: Programming it yourself
I don't think creating a desktop link can be done using JavaScript - there will be too many security restrictions in place blocking it.
For Windows, I think the closest thing would be generating shortcut .lnk
files on server side, and offering those for download. It's not trivial though, and its structure is not documented by Microsoft. There are unofficial guides like this: The Windows Shortcut File Format
You may be able to get around generating the files by creating them on your local system, and offering them for download. It may work if you use absolute web addresses - you'd have to try out. Don't forget to test on the various systems: 95, 98, XP, Vista, 7 ....
I'm sure there are equivalent shortcut formats on Mac OS and the various Linux Desktops, but I don't know them.