If you are talking about India, it wasn't a "country" before the British. It was a mixture of disparate kingdoms and sultanates. Not to mention that before the British, most of India was under Muslim colonizers i.e. the Mughals.
The Indians have always been a conquered people, it is only in the last 70 years that they have had freedom; you should thank the British for it.
The Mughals were not colonizers. The definition of a colony is: "country or area under the full or partial political control of another country". The Mughals were ousted from Central Asia; India was the only country they ruled. So, by definition, they were not colonizers.
That's not the context the OP used... It was: "you should thank", not "you should be thankful". A very subtle difference, but in this case (to you), it's the difference between offending and not.
I think both wordings are rude, particularly because of the word "you". OP doesn't know anything about his family's history. It's different from making a general argument that talks about the benefit to the whole country.
Define "country". To make your statement above to be true you will need a pretty narrow and tautological definition.
I presume you are not the brightest bulb as far as Indian history is concerned so it will help a bit if you read up a bit on Indian history, even Wikipedia would be a good start.
The Indians have always been a conquered people, it is only in the last 70 years that they have had freedom; you should thank the British for it.