There is no one root cause of loneliness; different people can experience loneliness to different degrees at various points in their lives. Often, circumstances like the end of a relationship will lead to increased feelings of loneliness.
That said, some psychologists believe that childhood experiences can be predictors of loneliness, largely because of the effect they have on attachment styles. An insecure attachment style can contribute to trouble in interpersonal relationships later in life, which may lead to loneliness.
Three other common causes of loneliness are:
Social anxiety or phobia goes beyond simple shyness. Rather than feeling uncomfortable or awkward in social situations, those with social anxiety have substantial, often unmanageable fear that others are harshly judging them, or even hate them. This can prevent people from making the connections necessary to create healthy social interaction.
Just as loneliness can cause depression, depression can be a causal factor for loneliness. The despair and hopelessness associated with clinical depression can cause a person to withdraw from the world, and social isolation can be the first step.
Low self-esteem can make a person feel unworthy of social interaction or attention. People with low self-esteem might socially isolate themselves because they feel they are unworthy of participation in social situations, or fear the reactions they anticipate others might have to their presence.