I think one of the older example had an example of a script taking user input. If I get a chance, and remember, this evening I will add an example to the Wiki since it does not seem to have one.
Do check out the scripting tut on making a racing game(By David Danik-Jones), I am pretty sure theres a high scores table example where players enter their name.
AC
Actually, under the Example projects http://unity3d.com/examples/index.html, download the Old: Script Examples project. In that project take a look at the EditableGUIText.js script. It accepts input on a GUIText.