This is a very complicated subject... Some simple thought processes to go through constantly
Your team just picked off an enemy:
Can you push/secure an objective safely?
Do you have creeps pushing into a tower? After picks, your best bet is to push the closest tower where you have creeps ready to help. put pressure on the map by pushing creep waves. If you aren't grouped up, and some or the rest of their team isn't visible, push a tower very cautiously. If you see the rest of the enemy team is far away, push the tower aggressively. Always be cautious with deeper towers. when you have a large distance to run to get back to safety, they have a much better oppurtunity to cut you off. Or push out the wave, don't siege the turret, and go group up for team fights.
Don't go and farm side lanes unless it's safe to do so. Many teamfights are lost because a team member is off "saving" a side lane and leaves the rest to fight 4v5. Also (and this is huge) if you have the oppurtunity to take an inner turret, don't go save your outer turret from a creep wave. You generate way more map pressure than you lose in that situation.
Trading an inner turret for an inner turret is perfectly fine when you are ahead. If you are behind, you should be playing defensively and shouldn't be sieging inner turrets at the loss of your own.
after a team fight there are many things to consider...
Did you win the fight? How many member are left on both teams? if you've got both the team member, damage, AND health advantage, siege those turrets. If you don't have all of those, don't dive a defended turret. Approach with caution and accept that you don't have a sufficient advantage. Try and get another pick, push an undefended tower, or raid their jungle a little bit. But ALWAYS pay attention to death timers (both teams) and champion locations. back off when your advantage ends, or you feel unsafe.
did you lose the team fight? How badly? Can you defend turrets? Sometimes you have to let them take open turrets. But NEVER do nothing while you watch it go down. This is your oppurtunity to fend off a creep wave in another lane. It's an oppurtunity to farm the jungle a little bit, go heal if you're near death, etc. just make sure you keep yourself alive and available to fight when your team respawns. If you die defending a turret, your team is going to have to fight 4v5 because you died 30 seconds after the team fight was lost. Giving up a tower is much better than defending, dying, losing the tower anyways, and making your team fight 4v5 right away. It'll just end up in another lost fight and another lost tower.
Knowing what to do comes with experience. I don't mean you'll get better at it just by playing more games. You have to be ACTIVELY looking at what you're doing. When you die, pay attention to WHY you died. Ganked with Lack of vision? Tried to siege a turret at the wrong time? Etc. pay attention to why your team mates fail, too. Don't be as critical of them as you are of yourself, though. When they die, you probably weren't watching and don't know all the circumstances. You can observe some small things, though. Like did they dive a turret? Did they get dived under their own turret 2v1? Did they over extend without wards? You get the picture.
Knowing what NOT to do is just as important as know what you should be doing. Because there are always multiple options. Some you should not do, and some are just way more advantageous than others. And I think the best way of learning what you should be doing is to really pay attention to your losses Where you just get stomped. When you get stomped badly, it's very likely your opponents did exactly what you are trying to learn.