16It was inspired by the divorce of Steven Spielberg's parents
E.T. was an amalgam of ideas that Steven Spielberg had. At one point in his career, he had planned to make a movie called Growing Up that was semi-autobiographical, based on childhood memories of disappearing into his imagination as a way of dealing with his parents' divorce. That particular effort never
got made. Neither did Night Skies, a more intense alien-themed project he worked on with writer John Sayles. It dealt with a family coming face-to-face with hostile beings from another planet.
These disparate ideas merged when Spielberg talked to screenwriter Melissa Mathison. He told her about the Night Skies alien concept, as well as some of his recollections of feeling lonely and adrift after his parents split. His idea was to meld the space creature idea to the very personal story of a young boy reeling from parental separation. Under his guidance, Mathison went on to write the screenplay. If E.T. often feels heartbreaking, that's because it's meant to. Spielberg made sure to infuse his own experiences into both the story itself and the overall atmosphere of the film.
Incidentally, as for Night Skies, the aliens got turned into ghosts as the project morphed into the Spielberg-produced Poltergeist.