Just as trying to envision your partner's hand (and not just thinking of your own hand), will improve your bidding accuracy, so trying to envision your partner's hand (and thinking) will improve your defense. You can make early hypotheses, but must be prepared to change (and improve!) them as you collect more information.
Trust that your partner's actions have logic behind them, and try to figure out what that logic is.
Case in Point. You hold: ♠743 ♥AK108 ♦A4 ♣10973
RHO opens 1♦; you pass; LHO bids 1♠. Partner passes. RHO rebids 1NT. LHO rebids 2♠ and that is the end of the auction.
Your partner leads the ♥5 and Dummy produces: ♠KJ ♥Q72 ♦QJ107 ♣KQ65.
The heart position is unclear; perhaps partner has led from three or four hearts to the ♥J, but that is not guaranteed, so you take the ♥K (thus revealing to partner that you also hold the ♥A), and play the ♦A and a low diamond. Declarer plays the ♦2 and the ♦5. Your partner plays the ♦3 and then takes the ♦K. Partner does NOT give you a diamond ruff, but instead cashes the ♣A—setting up the ♣KQ on dummy. (Partner also did NOT encourage you in diamonds even though she had the ♦K.) Partner now plays the ♥4! What is going on?
Partner knows you would not set up one of Dummy's long suits (♦QJ10x) without a good reason, so why did she not give you a diamond ruff? The most logical answer is that partner started with five diamonds and knows that Declarer is ALSO out of diamonds.
Why would partner cash the ♣A, deliberately setting up Dummy's King and Queen for discards? The most logical answer is that partner wants to make sure that YOU do NOT lead a club.
You should expect partner to have a DOUBLETON heart and take your Ace and give her a ruff. She has done everything possible to force you to come back a heart. If partner had really started out with the ♥J9654 originally, she would have led the ♥J the second round to save you from an uncomfortable guess. She knows you have the ♥A and she would not want to risk you making going up with the ♥A and having it ruffed on the second round.
Plus, count Declarer's hand. Declarer has at least six spades two diamonds, and at least one club. There is room for Declarer to have had four hearts originally. Partner has played ♥5 then the ♥4, so she either started with a doubleton or with five hearts and five hearts is not logical on her line of play.