Creating and passing parameters is helpful in a team testing environment, where an experienced tester can create a library of scripts that perform common testing functions from which a novice developer can select from when creating a more basic script. Creating and passing parameters also works well in single tester environments where complex functions are reused in several scripts.
You can create and pass parameters between a parent and child script or using a single script. The advantage of using a parent and child scenario is that multiple child scripts can use the parent script. For example, if the parent script creates a random number, you might want to use that functionality in several child scripts.