The P47 Thunderbolt was the best platform in the war, though the P51 generally overshadows it. The 8 .50 calls in the wings, with its incredible diving capability made it the king of the air when it came to ground support.
It wasn't only firepower, it was survivability of the P-47. It could take a lot of abuse from ground fire and still keep going. The big radial was reliable, and could keep running, even after some critical hits. The P-51's engine was liquid cooled. One hit to the radiator, and it was toast.
Someone else mentioned the P-38 which was also good a the ground attack role. It had TWO engines, so if one got it, the other could still get you home. Again, survivability was important. Doesn't hurt to have a 20MM either.
BTW, it can be argued the P-51 was a better air to air fighter than the P-47. It was generally considered the best piston fighter of WWII.