In Old English (AngloSaxonLanguage) and Middle English, there were separate second-person pronouns for singular and plural: thou/thee/thy/thine and ye/you/your/yours. In MiddleEnglish?, it gradually became customary to use the plural form instead of the singular when addressing a superior, and (later) when addressing an equal. The singular forms were retained for addressing inferiors for a long time. Now, they have almost completely gone out of use.
There are some survivals of 'thou' and its inflections. In some English dialects (exclusively northern? I don't know) they are used in addressing children, and equals with whom the speaker is intimate. (In most dialects, using it to anyone else is considered rude. In parts of Yorkshire, it is used as a substitute for the singular "you" in all contexts). Quakers use it as the usual singular form (or, at least, did until recently; I have heard it very seldom from the Quakers I know), I think out of a conviction that it's improper to show more respect to some people than to others.
Because of its use in the KingJamesVersion? of the Bible (published in 1610, slightly archaic in its language even then, and only supplanted by more recent translations in the last century or thereabouts) and in church liturgy, "thou" has survived as a mode of address to God. I suspect (but do not know) that it was originally intended to express intimacy, but now it is generally thought of as especially respectful and formal. How things change!
"Thou" is also used sometimes in poetry and very formal prose, generally with no connotations of intimacy involved. It would be interesting to know whether this is partly a result of the religious use of "thou".
I've heard it used as formal because of the religious meaning. If God is a thou, it must be pretty polite! For most people, it doesn't matter how informal it really is.
Many other European languages use singular and plural forms of the second-person pronoun in roughly the way English used to: 'tu' and 'vous' in French, for instance. It's curious that no one seems to use the third person plural as a mark of respect.
There are some survivals of 'thou' and its inflections...
Yeah, I had a good chuckle when I moved to Lancaster (NorthWestEngland?) and found this usage alive in the local dialect. I've heard it most in animated pub discussion, e.g. "Get thy dog out o'here", "What'll thee be having?" etc.
One of the best renditions of Shakespeare I have ever heard was a "dialect" rendition of "Richard III" in the Leeds Playhouse in Yorkshire, Northern England. In this, the members of the House of York spoke in a Yorkshire accent, whilst the House of Lancaster spoke with a Lancashire accent. Not only do the forms thou and thy sound perfectly natural when spoken with these accents, but expressions like t'was for nought (pronounced nowt in Yorkshire and note in Lancashire) are still used today.
The whole thing sounded much more alive and vigorous than it does when rendered in the usual "BBC English". The down side was, my American wife said that she could not follow most of the dialogue, though at that time she had been living in Yorkshire for only a few months.