This may seem very difficult, next to impossible, when you first reach Hardmode and summon The Twins, but don't fret! There's a very, very easy method to doing it.
FIRST THINGS FIRST
You need to start out by preparing by getting a few choice items. Here's what I use to kill this boss in just a couple of minutes and with no fear of death:
- Greater Healing Potion (5 or so)
- Band of Regeneration (+4 defense)
- Philosopher's Stone (+4 defense)
- Cross Necklace (+4 defense)
- Ironskin Potion (1 per fight)
- Thorns Potion (1 per fight)
- 150 Hellstone Ore (or so, up to you how much of it you want to grind)
- Crystal Bullets (500 per fight)
Anything else really doesn't matter, not even armor, thanks to the method I'll be going into below. You will want at least Adamantite armor though, of course, and it will help if you give all of your accessories +4 defense ("Warding"), for an additional 20 defense. You can get the Philsopher's Stone and Cross Necklace from the Mimic enemy, found deep in the caverns. If you can't be bothered to grind the Mimic for both, try for the Cross Necklace first as the strategy doesn't work without it.
Crystal Bullets are made by buying Musket Balls from the Arms Dealer and combining them with Crystal Shards, which are plentiful in the Underground Hallow (white parts on your map).
Keep in mind that you can buy multiple Musket Balls by holding RT! That confused me thoroughly until I figured it out.
+4 DEFENSE AND LEGENDARY GEAR, WTF?
You can reforge items with help from the Goblin Tinkerer, with the goal of making your weapons "Godly" or "Legendary" and to give you accessories +4 defense ("Warding") each, but it can get incredibly expensive. The are only two reasonable methods for getting that much money, the first of which is to build a "bird engine" and hook it up to goldfish or gel generators - you can google those concepts if you prefer to do it "legit." The other method involves abusing a glitch (which might have been patched when you're reading this in the future) involving an Ice Rod and a Gold Chest.
You can get the Ice Rod from the Wizard NPC, who you have to find somewhere in the world after entering Hardmode, and use it to put two ice blocks in mid-air somewhere in your village. Quickly put a gold chest on the ice, and stuff some useless junk in the chest (like a mushroom or something), then let the ice melt, save your game and leave the world. When you come back, the ice will be gone and the chest will be floating. If you smack at it with a hammer, it will still be there while you get 4 Gold Chests in your inventory. Just hold down RT until you've filled your inventory. A 75% full inventory will yield about a platinum and a half (i.e. 150 gold) and it'll only take a few minutes to fill if you rubberband RT.
So now that you have infinite money, use it to reforge all your items until they're the best they can be. I haven't been able to find a comprehensive list of the best buffs for each weapon, though, and unfortunately not every weapon/item has all buffs. Experiment and waste some money; you have enough!
ALL RIGHT, WHAT'S THE STRATEGY ALREADY?
What we'll be doing is building a Hellstone skybridge and abusing the Cross Necklace to basically exclude the boss from hurting you, and only taking (very little) damage from the Hellstone. This, of course, means you can't be wearing the Obsidian Skull or Obsidian Horseshoe.
Just build a tower straight up into the sky - it doesn't have to be very high but my skybridge is about halfway to space. Build a bridge extending from this tower, made out of Hellstone. I put down about 150-200 Hellstone and created a bridge that was about 3 screens long (on my TV).
With Cross Necklace equipped, you can't be pummeled with damage, which means that if you keep standing on the Hellstone, you'll keep taking 1-3 damage instead of taking 40-100 damage from the boss attacks. The combination of Cross Necklace and Hellstone means that you're effectively stopping the boss from being able to hurt you at all; you can stand in his face and not take damage as long as you're doing it on Hellstone with the Cross equipped.
Once you've built your Hellstone skybridge and collected the mentioned items, you'll be ready to take on the boss with ease. Activate the summoning item and just walk back and forth on your Hellstone, avoiding jumps as much as you can, while pummeling the boss with your best melee weapon if its close, and the Megashark and Crystal Bullets if its far away.
Here's a video example, it uses Skeletron but the same strategy applies to The Twins: