The Paladin throws hammers at the player from a distance. Hammers pass through walls and can easily kill a player in 4-5 hits, so good gear is highly recommended for those looking to farm his drops. Constant damage stops the Paladin from throwing hammers. Weapons such as Vilethorn, Crimson Rod/Nimbus Rod, Vampire Knives or Inferno Fork seem to be best for this.

When you see the Paladin coming, it is essential to prepare quickly. Make sure you have all the required gear easily selectable. Grapple anywhere where you can sit above him easily and once it is below you, cast your Nimbus Rod right above him. The constant damage will stop it from throwing his hammers up at you. Make sure to maintain the raincloud to keep the constant damage coming. This is important or it will throw hammers at you and, more than likely, kill you quickly.

Once you've established automatic constant damage, constantly cast your bolt spell down at it to deal large amounts of damage. Pause around half mana to regenerate so you can keep casting your bolt spell (alternatively, you can utilize mana potions)! Use health potions as well in the event the damage interval is long enough for the Paladin to throw a hammer. Watch out for any of the Dungeon's normal mobs, the mage-type skeletons in particular (i.e. Necromancer, Diabolist).

Another good strategy for killing the Paladin is to build a small platform to stand on just big enough so that the Paladin loses sight of you and stops throwing hammers. From there, you can simply kill him using weapons such as the Inferno Fork or Magnet Sphere. If you are yet to obtain these weapons the Chlorophyte Partisan or Nettle Burst, or any other multi-hit/penetrating weapons are viable options, preferably weapons that can shoot through walls or around your platform.

Melee

Attacking a Paladin using melee attacks is inadvisable, since the Paladin can deal devastating amounts of damage upon contact, and knock you away using its hammers. Thrown weapons like the Vampire Knives (which can also restore any health lost when fighting a Paladin) or Light Discs are preferable, as you stay out of range and it is made easier to dodge incoming hammers and deal with other dungeon monsters. If thrown weapons are not a viable option, a sword that can launch projectiles (i.e. Frostbrand, Terra Blade, etc) or a powerful spear like the Mushroom Spear will make defeating a Paladin much safer. Provided that none of these options are available, you should exercise extreme caution or simply escape as your chances of survival will be very low.

Ranged

Ranged users are capable of defeating a Paladin the most easily out of these three "job" types. Using a rapid firing weapon like the Megashark will not only prevent the Paladin from attacking you, it will also deal damage rapidly and easily kill the Paladin faster than a Melee or Magic-based player could. By employing a similar strategy to the Caster (grappling onto something higher than the Paladin and attacking from there), spamming your ranged weapon and moving as needed, it is the safest and most efficient method described here.

Another method is to use a Death Sickle and a Staff of the Frost Hydra. Close yourself in a box above flat dungeon ground, and spawn a Frost Hydra below you. Whenever an enemy/Paladin comes, you can use the Death Sickle as well to easily kill the Paladin. (Battle Potion and/or Water Candle recommended) However, this strategy is not ranged.

Note: If you are not in possession of a rapid firing or "splash" effect ranged weapon, you are in just as much (if not more) danger as a Melee character with no alernative to attacking one. Examples of typical rapid fire or splash damage weapons might be the Megashark or the Grenade Launcher.

Screenshot of the above strategy being executed.

A Paladin stuck in a wall

Late Game tips:

An easy way to kill the Paladin is by acquiring a Magnet Sphere, then grappling above the Paladin and simply casting it down constantly. It deals strong damage fairly quickly (especially if it is the only enemy it can attack), causing the Paladin to be stun-locked and unable to throw hammers at you. Because it can't attack, you can easily finish it.

Trivia

The Paladin is immune to the Confusion debuff, probably just to make the Paladin a more challenging enemy to overcome.

Although the word Paladin means "holy knight", where it appears and why it attacks the player suggests otherwise. A potential explanation is that the Paladin was killed in the dungeon, and it/the armor is now possessed by a Dungeon Spirit (further justified by the fact that killing one has a chance to spawn a Dungeon Spirit) or some form of evil or malevolent being.