There are three problems with the script you posted, and one of them may be just a problem that was caused when you pasted the code into your question.
Starting from the beginning: You need to tell Chrome where to do the JavaScript, like this:
tell application "Google Chrome" to tell active tab of front window to execute javascript "your script"
That will run the script in the current tab of the first window you opened (AFAIK, you can't yet get the active tab of the active window).
Next, you don't want that javascript:
prefix; Chrome knows it's JavaScript.
Finally, you're missing a paren at the very end of your line. Again, I'm not sure if this is just a copy problem, but it's something to be aware of.
Making the above changes, I have this code:
tell application "Google Chrome" to tell active tab of front window to execute javascript "Qr=prompt('Search%20Site%20for','');if(Qr)location.href='http://www.google.com/search?&q=site:'+encodeURIComponent(window.location.hostname)+'+'+escape(Qr)"
...which works.
open http://apple.stackexchange.com/questions/210601/open-a-bookmark-in-safari-from-terminal
Will open this page (in the default browser).
Best Answer
Found out the reason. I had a profile installed for an email account (that uses open-xchange servers) which was adding a Web Clip to the homepage. I disabled that Profile, and added the servers for the email account manually. Icon disappeared and problem solved! :)