There could be numerous reasons for this, I'll touch on the ones that most likely applied to your situation.
Farm - Master Yi is a notorious farmer, his alpha strike at higher levels can wipe entire minion waves in one hit. At lower levels he can damage them greatly and just finish them off with auto attacks. Very few champions can zone Master Yi when it comes to farming because he will target the minion closest to his side of the lane, but alpha strike will hit multiple targets and place him back to the original positioning. Now lots of farm equals lots of gold, which means he can build items quicker. So if someone is outfarming (and also outkilling by the sounds of it) you, they will naturally do more damage because they have more gold to buy more items. Since any minion kill, whether minions kill minions or you finish them off, you still get XP, so you can stay the same level but be significantly outfarmed.
Meditation - Yi has amazing sustainability in lane through his meditation, while he whittles you down bit by bit he can retreat and heal himself a great deal whenever you do some damage to him, so naturally over time he is going to get the kill because he has outlasted you in lane. Put a few health pots on top of that and a lot of champions are just going to get pwned.
AP build - AP Yi is just plain broken, his alpha strike scales 100% on AP, so let's take a look at level 1 Alpha Strike: It does 100 base magic damage, so if you go hard AP and start a dorans you could theoretically have 48 AP out the box. You get 16 AP from Masteries, 17 from runes, plus another 5% of your total from the Archmage mastery, then the dorans ring gives another 15 (sorry if my math is a bit off, did it in my head, but it's really close) and with that your level 1 Alpha Strike at champion level 1 will do 148 damage per strike. Considering that tanky champions only start with around 500 health (this is before runes and masteries) 148 damage is quite a chunk. Now you have to factor in any magic resist you have to the actual damage you take, but it will still be a decent chunk. Now back to meditation, Yi received and instant heal of 11.7 when he activates the ability, this scales to 33% (or right around there) of his AP, so since we have 48 AP to start he heals initially for about 27 health, he channels this for 5 seconds healing 26.7 (I think) health per second with a 77% AP scaling, so he heals for around 40 health per second for 5 seconds healing for around 200 health, now after the channel he gains another instant heal of 25 with no AP scaling. So through the entire meditation he gains a total of about 252 health, on top of that regeneration he gains 100 armor and magic resist while he is channeling. Now that's a hell of a heal if you are going hard AP with him, especially if while you are meditating you have a health pot ticking. He also has a damage buff on his E that increases his attack damage by 15, but has no scaling thank god. (If you want to crunch the numbers exactly you can get all the info from leagueoflegends.wikia.com, all those numbers are from level 1 of the skill with a generic AP mastery and rune set, so of course the numbers can vary depending on your runes and masteries.) So with that massive Alpha Strike, that ridiculous heal, and a damage buff, you can see why AP Yi can be a terror in lane.
Summoner Skill - Honestly, often times you are just being outplayed. None of us are perfect at League, we have good games, and we have bad games. We go against people we are better than in lane and we always find those people that are just plain better than us. I think a lot of the people who say a champion is "OP" are just simply getting outplayed. There are champions that are quite annoying and have some skills that seem impossible to defend against, but everyone has their counters, and it's up to us to outplay our opponents.
I hope some of this helps to understand what happened in your game. My best advice is when you find a champion you just can't seem to beat, head over to the wikia, crunch the numbers and you will be more prepared when you face off against that opponent next time. It is also a good idea to browse your favorite build page (such as solomid.net) and see crunch those numbers for a variety of different rune and mastery setups to give you a more broad idea of that champions abilities. Also by doing this you will begin to see which champions have a better chance of surviving others in lane.