You should ask the user before publishing the high scores for 2 reasons:

 - Some users don't want their scores uploaded (by principle, or to avoid being spied on) even if it doesn't make any sense for most people.
 - Some countries have very strong data protection laws and you can get into trouble if you submit user data without user's permission, Even more so if you don't allow users to access their own data or to erase these data.

You can avoid asking the user's permission in some cases. For example if the user logged-in to a system, explicitly granting the permission to upload and use data. If you are using this system to submit data you have implicitly the right to do so. Some examples would be Apple's [Game Center][1], Microsoft's [Xbox Live][2], [openfeint][3], [crystal][4]... 

Otherwise you should always ask the user at least when he launches the game of when trying to upload the data for the first time.


----------


**edit**: [this answer by Marcks Thomas][5] reminded me of another way of doing this. I worked with companies which automatically upload various anonymous usage data (not sure about high scores though) even if the user has not explicitly given his permission in game. This behavior is documented in the user agreement. But the user can opt-out, in the options there is a checkbox to disable that data upload. So at no point there are questions popping up about data uploads.

I think this is the least intrusive way of doing high scores. But it requires providing a user agreement and notifying the user about it at launch.

----------

Disclaimer: I am not a lawyer and this answer is no way legal advice.


  [1]: http://www.apple.com/game-center/
  [2]: http://www.xbox.com/live
  [3]: http://support.openfeint.com/dev/welcome/
  [4]: https://crystal.fogbugz.com/default.asp?W7
  [5]: http://gamedev.stackexchange.com/a/35732/8328