Star-Lord's element gun is capable of projecting any element he wants be it fire, water, earth wind or even lightning. It is often depicted as being rechargable and voice activated.
In one of his confrontations with the Olympians, the Element Gun searched for an energy source to recharge and only found the Greek gods. Seconds later, Quill was caught in a black hole bomb and teleported to a new mystical reality. There, the power of the gods had given his gun infinite charge.
When he returned to his world through a mystical portal, the process awakened abilities in Quill from an old mentor, the Master of the Sun, he believed to be a memory implant. Quill was now the Master of the Sun, capable of generating the elements innately, using the Element Gun as a prism for which to focus his ability.