Bottom note box.
The origins of this idiom.
The meaning of this phrase.
Phrases and Idioms - The Meanings and History For Popular Idioms and Phrases | Use this handy list of phrases to search for more!
Someone or something that one finds to be agreeable or delightful.
There are a large amount of different drinks available on the earth today, and many people have a preferance as to what they drink. One of the more common beverages people consume is tea. In fact, tea is considered to be the most widely consumed beverage in the world next to water. Indeed, tea is a widely known drink that is enjoyed by millions of people. Thus, the idea for this phrase is that when someone or something is to a person's liking, they liken it to a cup of tea.

From what I've found, this phrase goes back to at least the 1930s, as this is when it started commonly appearing in writing to describe a person's likes or dislikes. For example, in the Syracuse Post Standard, February 1935, there's an advertisement for windows that reads:

"As Margie always says, 'Saving energy is great, but taking the hassle out of window cleanin' is my cup
of tea.'"

A year later in 1936, someone in the Fitchburg Sentinel uses the idiom to describe a dislike they have, saying quite simply:

"I don't think it's my cup of tea."

That's actually how most people utilize the phrase today, to describe something that is not to their liking. They just add the word 'not' to the front of the phrase. An early example of this is seen in a literary work by James Agate, who wrote the figure of speech in one of his literary works. It was first published in 1939 and reads:

"For assuredly immersion in medieval legend is not my cup of tea."
* I listened to some music that a friend recommended, but after giving it a thorough listen, I have to say that it was not my cup of
Note: The origins for most common idioms cannot be said with a certainty. What's provided are theories that may be plausible to how a phrase originated, but not necessarily so.

In addition, quotes that contain a phrase may be taken from old newspapers, poems, or books that were written centuries ago, but this by no means shows they originated from these. In all likelihood, if an expression is being used in a newspaper, it's probably already well known, and thus, from an older period of time.
Know Your Phrase - The Phrase Meanings For Common Idioms and Expressions > M-Letter Sayings