A shadow can symbolize many different things. Given that you posted this in the Literature section, without tagging with a specific text, the answer to your question will be generalized using literary aspects.
A shadow can represent any/or all of the following:
-A doppelganger (a twin of another character used as a foil or representation of something hidden). Example: Bertha Mason in Jane Eyre.
-A representation of something dark (as used in foreshadowing), foreboding, or evil. Example: The description of the plantation in Desiree's Baby.
-An internal conflict of a character (something that the character fails to face and the shadow represents the issue/problem following them until it is dealt with). Example: Frankenstein
-A flashback to the past. Example: The Sound and the Fury.
-Damnation or fall into the underworld. Example: Dante's Inferno
-An evil spirit which trails another character. Example: Demons in This Present Darkness.
While this list is far from complete, it does offer insight into the multiple uses of a shadow or shadow imagery within a text.
When I think about shadows, Peter Pan (Barrie) always come to mind, since it has one of the most famous shadows in English literature. Peter Pan loses his shadow in the Darling home, where it is locked up in a drawer by Mrs. Darling. Peter returns for his shadow but has difficulties attaching it to himself again. Wendy, the Darling daughter, sews it back onto him, albeit in a somewhat wrinkled state, and Peter Pan, rather than being appreciative, takes the credit for Wendy's cleverness in having solved the problem.
We are only speculating about what this shadow represents in the story. But having lost the shadow in the Darling home and having had it restored by Wendy, Peter has now become engaged with the "real" world outside of Neverland. The shadow is what has drawn him back. His return for it and Wendy's restoration of it might symbolize his yearning for the proper care that he never had a child, the lack of which has created a child who has determined never to grow up, but one who longs for love and care, nevertheless. The fact that the shadow is now wrinkled suggests that the reattachment is imperfect and Peter cannot return to Neverland in the completely innocent, childlike way he left it. The attachment of the shadow also suggests that now Wendy and Peter are attached, literally, with threads, and figuratively, with her rescue. Does the shadow represent maturity or perhaps even death, the shadow that hangs over all of us? Does Peter understand that even as a child who has committed to not growing up, he still needs his shadow to be fully human? Or is the shadow a symbol of Peter's narcissism, a means by which he can admire his own form?
I am aware of very little commentary or analysis on the shadow in the story, but I cannot help but think that this element was chosen in a deliberate way by Barrie, and each reader must make meaning of it in his or her own way.