i supose it depends greatly on what your wanting to create,..... you cant sing the blues if you have never been blue,.... or write a poem on the loss of a loved one if you never experience the death of someone close to you.
i think creative people are ALWAYS creating,... they do this while happy and while sad,.... i think the "greatness factor" is when the general public (those who dont create, but instead, consume what is created) makes a deep connection to something that serves as thier outlet for thier own lonelyness.
most people dont need help sorting out thier feelings of joy or happines, and thier are not many apreciable negative consequences in not sorting out, or finding an outlet for feelings of happiness and joy,....
but feelings of lonelyness often do need an outlet, an interpreter, and if one isnt found, lonelyness can lead to depression and worse,.... creative people give the general public, through songs, paintings, etc,... the emotional outlet/interpratation that they cant find themselves.... i'm a big believer in the idea that the radio is often the best therapist.
so NO.... you dont have to be lonely to be creative,... but society will give great merit to the arts that got them through the tough times, far and above the arts that celebrate the good times,... thats just the way it is,... neither right nor wrong.