Sorry if it's a dumb question, i asked the same thing on the WMA (western martial arts) sub, and the responses heven't been definitive. Thanks in advance for all responses!
Yes, the rapier would have been worn in day-to-day life by courtiers, but it can't be understood entirely separate from its function as a dueling weapon. This was a fashion that came about in the early 1500s Italy, and from there - along with the 'duel of honor' - spread to Europe over the ensuing century, especially France and England, and to be supplanted by the small sword by the late 1600s, with the wearing of swords, generally, to finally decline as we progress through the 18th century. The wearing of the sword was a signifier of social status, that one was a gentleman, and capable of demanding or giving satisfaction in the 'duel of honor'. In the words of Margaret Cavendish, describing the proper gentleman of 17th century England:
all Gallant Gentlemen ought to wear Swords, at all Times, and in all Places and Companies
For several places which discuss the sword and its importance to the social dynamics of the courtier in the period, try:
Anglo, Sydney. “How to Kill a Man at Your Ease: Fencing Books and the Duelling Ethic.” In Chivalry in the Renaissance, edited by Sydney Anglo, 1–12. Boydell Press.
Billacois, Francois. The Duel: Its Rise and Fall in Early Modern France
Manning, Roger B.. Swordsmen: The Martial Ethos in the Three Kingdoms
Peltonen, Markku. The Duel in Early Modern England