The game's meta shifts pretty quickly, so unfortunately there's not just a few types of troops that you can upgrade and hope to be ready for every situation. My advice would be to practice some of the major strategies. When you come across one that is particularly effective and you can deploy it consistently, make sure you focus on unlocking the upgrades for that particular strategy first.
Let's be honest as well - for most people, the only thing that consistently pays out is collector farming with cheap armies. Clan wars and trashing bases for storages/trophies are nice for the "glory!" factor, but they're generally going to cost you resources, which costs you time and/or money.
That said, I'll try to cover a few types of attack that work well with the current meta, and what troops I personally prioritize:
- BARCH - this is the #1 farming strategy, hands down. You can throw in Minions and make it BAM if you want, but I find most of the time I get 80-90% of the resources out of a collector-heavy base with just barbs and archers.
- Giant/Healer/Wallbreakers - this is a decent strategy until around TH7 or so. By this point, bases are so large that giants really can't make it through the whole base, and the high level of ADs means that your healers won't last long.
- Mass Dragon + Rage - this is still a pretty good strategy for TH7-8, and maybe into the early stages of TH9. It's also really easy to deploy. I've tried being strategic before, and in wars I always find my cohorts who just drop a big mass of dragons get more stars than I do.
- Hogs - Hogs have been the subject of many nerfs recently, but they can still be effective if the base design permits it. Double big bombs and skeleton traps tend to do the most damage vs this strategy.
- Balloons + Minions (Ballonion) - This is a good strategy against bases where the AD is low level or improperly placed. You can also use dragons instead of minions if that suits you.
- Golem/Wizard/PEKKA (GoWiPe) - there are a bunch of high-end very high level DE troop strategies out there. I like GoWiPe, although I think GoWiWi (Golem/Wizard/Witch) is also popular. This is really for crushing bases that have a lot of stuff in storage, or clan wars if there's some really good reason to invest this much in resources.
Again, here, what I'd suggest is practice a new strategy, and if it works for you, then upgrade the troops. I'd also suggest upgrade everything before you bump your TH up, because you never know what the next meta will bring to previously useless troops. It's almost always easier to raid and save up for your upgrades at a lower TH than at a higher TH.
On defending
My advice for you to save the maximum elixir is to fill your barracks completely before you log out. What this does is consumes elixir to put troops in queue within your barracks thus decreasing the amount of lootable elixir from your elixir storages (you can do the same with your Dark Elixir if you have Dark Barracks).
When you log in next time, just empty your barracks to get the 'stored' elixir back. Before unlocking the dragon, the most expensive unit per slot is the wall breaker. So what I would advise doing would be that you fill your army camps and when they are full, fill up your barracks with wall breakers and for any remaining space, if any, with archers.
Next is to discourage weaker players from attempting to raid your base and instead go for the win. This is done by placing your Town Hall way outside your main base. Often players will send a few troops to destroy your Town Hall and then walk away with only 1000 gold and elixir, and giving you a 12 hour shield (they know their troops are too weak to break in your main base and take your resources). In contrast, if your Town Hall is hard to reach for weaker players, chances are they won't attack and a stronger player will come by instead and take everything.
EDIT: With the 2015 update to shields and loot storage, this is no longer viable.
My last piece of advice here would be to rearrange your base when needed. You have a few storages and it is not easy to protect everything. Certainly though, you can protect a few more than others at any time. When you need to save elixir, put your elixir storages more in the centre of your base where it would be better protected and move your gold storages further out.
On attacking
I personally am not a good fan of waiting for my collectors to get the resources I need. I get most of my resources through raiding other bases. My advice now for how to do so:
Don't be afraid to tap NEXT
When you are raiding for resources, you really should not care about trophies that much. The best use of trophies at this time would be if you get a nice loot bonus or if you are going for the achievements to get some gems (so that you unlock another builder if you haven't unlocked them all yet). This brings me to the main point: look for bases where the collectors and mines are full. They are not always easy to come by, but a single raid for such bases usually gives you 200k of gold and elixir or more and you don't need expensive troops to get them.
Paying a few gold and wait for the perfect opportunities are well worth it. If you find a base with little to no resources, it is best for you to skip and find another to raid.
Send your barbarians and archers to attack those filled up elixir collectors and gold mines. Such bases have usually be abandoned anyway, so you are not doing any harm. Even if you don't win the raid, you will keep the resources.
I will also share this video from a youtuber I follow for this nice video about raiding with examples of full and empty resource buildings and some raid examples: link
Best Answer
Battle time becomes a serious concern as you approach the top tiers of TH7. The giant/healer strategy starts to become too slow against many well-designed bases.
It's important to find out where you're spending your time. You can watch the replays and count seconds to get a pretty accurate picture of what's happening.
Probably the most critical parts are drawing out the clan castle troops and dealing with walls. Even a big pack of Giants still takes time to break through walls, and when many walls stand between you and your goal, things can slow down significantly.
The clan castle is important to draw out no matter what troops you're using, but you can be attacking another part of the base at the same time, if you're confident in your clan castle drawing skills. This sort of divided focus can be hard to manage, so practice it against matchmaking bases outside of war until you get the hang of it.
As some have said, air attacks can be faster, as air units bypass walls. This gets expensive, though, and it requires training to understand the best way to deploy air troops. All dragon attacks are usually so costly that you won't profit in terms of elixir from wars. However, if you're late TH7, you might not care about elixir, and you might just be in wars for the DE/gold for walls. If that's the case, then by all means blow elixir on dragons. A mix of dragons and balloons can be cheaper, and if you deploy them strategically it's possible to 3* a lot of different TH7 bases this way.
Also, you can bring along wall breakers to speed up the wall destruction process for your ground troops. This becomes somewhat difficult against bases with deep walls, as the breakers don't have much HP, take decent troop space, and are useless against things that aren't walls. If you've got a very "honeycomb" base you're up against, though, they can be devastating if used properly.
So tl;dr: