Yes you can summon him again. When you defeated the pillars they would have dropped celestial fragments, using 20 of each at an Ancient Manipulator (dropped by the Lunatic Cultist) will let you craft a Celestial Sigil. This can be used to summon the Moonlord.