Very often, when people get angry, they swear. They use many vulgar words which they wouldn’t normally use. When you say “excuse my French”, what you mean is that you are sorry that you have sprinkled your conversation with words which are considered impolite. You are apologizing for swearing in the presence of those who might be offended by it.
The expression “pardon my French” has the same meaning. Why the French, and not the Germans or Russians? The answer is fairly simple. The English hated the French; they thought that the French were vulgar people who swore all the time. Therefore, when an Englishman says, “pardon my French”, what he means is that he is going to behave crudely like a Frenchman!
In a nutshell, “excuse my French” is a common phrase meaning “excuse my bad language” or “excuse me for cursing”.