The phrase can convey sarcasm if someone does something unusual or annoying. Oh, go ahead and play your guitar at midnight, it's a free country, isn't it?
Pro Tip 2/3
Defensive Response
Used to defend one's actions when criticized, emphasizing their rights. I can dye my hair green if I want to, it's a free country.
Pro Tip 3/3
Informal Use
The phrase is informal, best used in casual conversations or discussions. You can't tell me not to eat this in class, it's a free country.