Comments in shell scripting are used to add explanations or documentation within the script. They are ignored by the shell and serve as notes for human readers.