Some of the answers focus on tuning here, but as Michael Curtis points out, that's not an issue on many instruments (and -- as phoog notes in comments -- isn't even an issue for many performers on instruments with more flexible tuning unless they're particularly sensitive to how they tune unusual intervals). Historically, the distinction was partly wrapped up in tuning issues, but there's more to why ultimately all diminished and augmented intervals are declared "dissonant," even if they have enharmonic "consonant" equivalence.
And that has to do with function, something hinted at in a few answers. Functionally, if an augmented or diminished interval is spelled correctly, then it is necessarily also occurring in a situation that would be considered melodically (and possibly harmonically) dissonant. And any melodically dissonant leap would have additional contrapuntal rules placed upon it, such as whether it was possible to leap to or from those notes, or how that melodic leap should be used or resolved in subsequent melodic context.
This is easier to see by analyzing intervals that are more likely to occur in practice, like a diminished fourth. Enharmonically, a diminished fourth on a piano is the same interval as a major third, but whenever a diminished fourth is properly spelled within a key, it acts as a dissonance.
For example, consider C minor. If one leaps from E♭ to B♮, that is utilizing common notes within the minor scale, going from the normal third scale degree to the leading tone. But that's a "charged" interval. If you play for a few bars in C minor and then play that interval, you'll feel like it has to "resolve" (similar to how a tritone leap feels like it should "resolve"), and your ear will likely recreate a feeling of dominant harmony under the B, even if you don't play the chord. The B♮ generally must resolve upward to C in a C minor context, particularly after a leap like that.
However, now reimagine the same keys on the piano played in the context of B major. Now it's a leap down from D♯ down to B, and both of those notes feel like "stable" parts of the tonic chord. There's no need for resolution.
I've done this demonstration many times for musical beginners to explain why spelling of intervals is important. Playing in a C minor context, they feel like the E♭-B♮ diminished fourth "needs to resolve" melodically, but then I'll immediately follow that by playing the same notes where the D♯-B are in a B major triad, and suddenly they become confused and say, "huh, that's consonant and stable."
(The same would apply if that diminished fourth would be used as a harmonic interval. In the scenario above, I suppose that could occur in the context of a dominant chord in C minor with an added minor thirteenth. That's not a stable interval in classical harmony. It would be treated as a dissonance.
Either the minor thirteenth is going to have to resolve down to become consonant with the rest of the V chord, or the chord is going to have to change -- say dominant to tonic, where the leading tone resolves and again gets rid of the diminished fourth interval.)
The same thing goes for an interval like an augmented third. The problem is that it's quite a bit harder to demonstrate a situation where one would spell an augmented third melodically that way in a tonal context. I've tried a bit to think of one that didn't seem contrived, but it's difficult. In most contexts where I think this would likely occur, the augmented third would be part of some figure where the destination note is obviously a kind of chromatic appoggiatura that would be required to resolve.
Just to try to imagine a harmonic scenario, I suppose we might start in C minor again. One might, I suppose, have a D♭, as the root of a Neapolitan chord, and then leap to F♯ as the third of a V/V chord. This would generally be a very bad idea contrapuntally, but if you did it, you'd be obligated to resolve the F♯ upward to G as the leading tone to scale degree 5. The melodic interval would be considered "dissonant" and require resolution. If the harmonic context changed in such a way that you could actually respell the interval as a perfect fourth (e.g., a D♭-G♭ leap in the context of a modulation where the Neapolitan is used to modulate to the key of G♭ or something), the note leapt to would generally not require "resolution."
This is the sense in which "melodic dissonance" is meaningful: one or both notes of the interval are tendency tones that want to resolve in a particular direction, and after the leap, one is usually obligated contrapuntally to do so. But that obligation on an augmented third would not generally apply to a melodic leap of a perfect fourth.
While the same concept would apply to a harmonic interval, the chances of encountering a legitimate correctly spelled augmented third in a tonal piece are possibly even lower than finding a melodic one. I suppose one might consider a V7 chord in C. Now imagine that the leading tone B uses a neighbor tone figure moving B-A♯-B. That would create a "dissonant" interval of an augmented third between F and A♯ which is corrected ("resolved") by the A♯ moving back to the chord tone B. But here the "dissonance" is mostly created by the context, just as it was in the diminished fourth example in C minor discussed above. If we heard a passage with a bunch of chromatic lower neighbor tones in a piece, we'd know the A♯ needs to move back upward to the leading tone. Out of context, the F-A♯ harmonic interval could be lots of things (and could sound like the stable perfect fourth F-B♭, and it might even create a minor-minor seventh chord in a different context). But in that motivic/harmonic context, it's unstable and the A♯ must move to the B (which itself is part of a tritone that will then resolve as well).
In essence, spelling matters, even if the tuning of two enharmonic intervals is the same. Enharmonically equivalent intervals are functionally quite different -- in one context, they may be stable and "consonant," but in another context (and with a different spelling), they may require resolution and in any reasonable harmonic context will sound locally "dissonant." Pretty much any scenario you can come up with involving a harmonic or melodic use of an augmented third within a major or minor key and assuming that that spelling is correct is necessarily going to be unstable and require resolution.