A correspondent writes to ask how aren't I? became acceptable usage. 'For first person questions it is easy enough to say, for instance, "I am right, am I not?" So why would it have developed as alternate usage?'
The history is a bit obscure, but it seems to be this. The verb forms of English have long existed in two styles - formal and informal. Alongside I am going we have informal I'm going. Alongside, formal are you not (earlier are not you) we have aren't you. And so on.
The first person followed this pattern. We find both am I not and amn't I - the latter usage still the colloquial norm today in Irish English and some Scots. But there's a pronunciation problem - the sequence of /m/ and /n/ is awkward, and it was a natural development to simplify the consonant cluster. The final /t/ made it more likely that the simplification would go to /ant/ rather than /amt/, and this is what we find in 18th century texts, where it appears as an't. The OED has an earliest citation for 1799, but I'm sure much earlier instances will turn up in due course.
The pronunciation of the /a/ vowel probably varied in length - sometimes short, sometimes long ('ahnt'). That would have made it sound exactly the same as the other forms in the paradigm (aren't you / we / they) - bearing in mind that the /r/ after the vowel would not have been sounded in the newly emerging Received Pronunciation around 1800. So, if the first person sounded like the other persons, it would have been very natural for people to start spelling the word in the same way as the others. It's an example of orthographic analogy. Aren't I became the standard form in British English, and an't I (very popular in the 1800s) gradually fell out of use. It's widely used in US English too, but some Americans dislike it, finding it genteel.
As soon as aren't I became the norm, it lost its colloquial status. So, if people could say and write aren't I in formal situations, what could they say in informal situations? The stage was set for the emergence of a further alternative: ain't, which originally didn't have the nonstandard resonance that it has today, being widely used as a colloquialism among upper-class as well as lower-class speakers. It was probably the frequent use of this form in the literary representation of lower-class speech (especially in Dickens) that eventually turned educated people against it. Fowler tried to resuscitate it, in his 1926 Dictionary of Modern English Usage, describing ain't as 'a natural contraction... supplying a real want', but his view had no influence.