The most simple answer would be: "Use them when you need them".
If you write a function like "take out the trash" something that might not be fun, that takes a while but is always the same you just want to be able to trigger it when you need it without rewriting it, then you would not need a parameter. If you want a function to be interactive, to act on different inputs differently or at least expect any input at all than you would need parameters. So an example for a function that needs a parameter would be console.log as the output highly depends on what the user inputs and a function that does not take parameters would be Math.random as it always give you a random number between 0 and 1 whenever you ask for one.
Another example would be the exercise about the RPS game. There the compare function has parameters so you can rip it out of it's context feed it by your own values and it will still run, if you instead use the userChoice, computerChoice variables as global ones than you would need to copy them as well or write your own.