It's almost purely subjective.
The only advantage scripts have over one liners is that they can be nicely formatted, thus easier to troubleshoot and debug when something invetiably goes wrong.
The only advantage one liners have is that you do not need to put the code in a file, make the file executable and execute the file to run the code.
I suppose a case could be made for the portability of one liners (it's easier for someone to copy a one liner from the net into his terminal and run it than to download and execute a script)
I think really the main thing is just paranoia, possibly even justified paranoia. A conceptual fear of unaudited code or something along those lines.
One liners are inherently simple because people don't really make script sized one liners. Because it's a pain in the ass to work with huge one liners, when they exist it's usually as some kind of joke, or just to prove a point that it's possible rather than for practical reasons.
So when you're looking for how to do stuff on the net you are likelier to prefer one liners because you can in a matter of seconds look over the entire 'code and ensure that there's nothing obviously fishy in it. Then copy paste it to a terminal and execute it without the slightly more involved process I described earlier for executing scripts.
Whereas with a script that's say maybe 100 lines... I mean it's easy to do the same, trivially so, but it's intimidating for people who aren't used to it. Which would explain the strong preference for one liners.
I sometimes use the techniques used for creating one liners in my scripts too in fact, for formatting, to make it appear shorter and have a smaller line count. It's purely for aesthetics, some people hate it, I like it.
For instance instead of getting a string, setting it as a variable, processing the variable to remove parts of the string I don't want (typically with sed awk or grep), then passing that along to some function, I might just pass a one liner that gets and modifies the string straight to the function without setting the variable. Effectively passing a one liner as an argument to a function. I do this kind of thing a lot.
But when it comes down to it, as anyone who has any programming knowledge can verify, running the whole code in one line and running it in a nicely formatted script is ultimately the exact same thing. The only difference is to how the user interacts with the code, not how the code gets executed, to the computer it is the same code.
Which means, there is no right answer here. Just do what you prefer, what feels right, it doesn't truly matter. When people are asking for help with doing something as a one liner, something I've done quite a bit, it's just because they want to do the thing as a one liner, there's never as far as I'm aware a real practical reason for using one liners besides just simple convenience.
I often use the process of trying to convert some beefy chunk of code into a simpler one liner as a learning opportunity to optimize how I write my scripts, reduce the number of executions, and such.