I'm not sure what your current loadout is. but the Flarion is a pretty powerful weapon to use for the Lunar Pillars before obtaining Solar Fragments. I'd recommend farming Duke Fishron if you haven't yet. The Influx Weaver and Horseman's Blade are also fairly efficient melee weapons to use.
If you don't have Beetle Armor, I'd recommend crafting that. I'd also recommend attempting to defeat the solar pillar 1st, from there you will be able to craft the Solar Eruption and/or Daybreak which are the highest tier Melee Weapons in the game before the Moon Lord itself.