Patrick Star- Was made to represent his longing for a real friend. He was also made because he always wanted a friend was dumber than him to help him feel better about his own Retardation.
Squidward Tentacles- Was made to represent the bullies that made fun of him. The love Songebob has for Squidward represents all of the times he tried to be friends with the bullies, even though they scolded him for it.
Mr. Krabs- Was made to represent all of the times that bullies pretended to be his friend and taking advantage of his stupidity.
Gary- Was made to represent his parents, that had to live and put up with him.
Sandy- Was made to represent his love for the most popular girl in school and his dream that she loved him back.
Plankton- Was made to represent his big sister, who was always nagging and making fun of him. All things that led to her death.
So there you have it. The real story of Spongebob.