There are a variety of factors that affect how many resources you can steal from an opponent, but there is one huge one: Town Hall level. If your opponent is at your TH level, or 1 level above or below, you get a 100% modifier on what you can steal. However, if your opponent is 2 levels above you get a 125% modifier, and if 3 levels above you get a 150% modifier.
Moreover, that same opponent would get a 50% and 25% modifier (respectively) for any attempt to revenge you. Given the current Town Hall level cap, this makes Town Hall level 7 a very attractive level to farm from. It will be hard to take down TH 9 opponents, but there will be the occasional easy target – but more importantly your resources will be relatively safe from the toughest opponents.
Your Town Hall level also affects the cost to search for new opponents when matchmaking, which can really start to add up at the higher levels.