Functions should take input only to their parameters. Whether you're passing in an entire object or individual values depends on the situation. Many cmdlets (like Set-Service) can do both.
Functions should produce objects as output. If a function is doing something and not producing any output, you can optionally implement a -PassThru parameter (again, see Set-Service) so that your function can output its original input for the rest of the pipeline to deal with.