It has always seemed to me that Sherlock notices Molly in a different way than other people. Of course he notices everything about everyone, but the way he goes about it with Molly feels different. When he deduces other people, he is either showing off or proving his point when working on a case (or we only see these deductions written on the screen as he does not reveal them out loud, which never happens with Molly!). With Molly, it seems like he does it for himself, like he’s just thinking out loud, not like he’s performing for a crowd. He holds Molly in high regard. Molly was there before he met John and Sherlock trusts her enough (meaning a lot!) to help him with his experiments which are very important to him and his work (“I need to know what bruises form in the next twenty minutes, a man’s alibi depends upon it”).
He seems to comment on her appearance more than anyone else (lipstick, hair, weight, etc) and not for any purpose. Sherlock only fills his mind palace with information that he deems useful. Molly’s appearance and her presence take up a part of it (and this was proven in HFV after he was shot). And why does he feel the need to tell her these comments if she is insignificant to him? It is as if he is, either consciously or unconsciously, letting her know he thinks about her. In the lab scene in TRF (“I don’t matter”), he suddenly becomes aware of her importance to him and realizes that he has been taking her for granted. Sherlock lacks social awareness and I think this was a very eye-opening moment for him. We, the audience, could see this transformation (mostly starting with season 2 and the Christmas scene) and at that moment he saw it himself.
Also, this scene in TSOT shows how much their relationship has developed. The scene in TBB where he compliments her new hairstyle was basically him trying to sweet-talk his way into the morgue. He needed to show the inspector the tattoos on the feet of both of the victims to would prove that the crimes were connected. Molly is flattered and willingly complies with his request, even though she was probably breaking the rules (“the paperwork has already gone through”). In contrast, this scene in TSOT, when he tells her she looks well, doesn’t have that same manipulative aspect to it. To me, he is being genuine here and wants her to know that she looks good (also he pauses after “you look” which might mean he was going to use another compliment and settled for “well”). Molly is no longer so acquiescent, she stands up for herself. I love that she responds “I am” to this compliment. She knows she looks good and not just because he tells her so. She is also more comfortable with their relationship which she proves by teasing him and making him flustered. They have a more balanced relationship. It is not just her having a crush on him anymore. They respect each other.
Sherlock is not one to dole out a lot of compliments. I’m trying recall other instances of him doing so (besides his best man speech) and can’t think of a specific one at the moment (there might be some I just can’t think of right now). Ever since Sherlock became aware of Molly’s importance to him, he has complimented her several times (and of course we will never forget that she is the “ONE person that mattered the most”).
Also in this scene, he acts like he barely remembers Tom, but to me, he’s feigning indifference. I think he’s interested in hearing how their relationship is going. Sherlock doesn’t enjoy small talk. In TSOT, he tries “chatting” with John (about Sholto) and then says he “won’t be trying that again”. Why would he bother asking about Tom, and therefore Molly and Tom’s relationship, unless he is genuinely interested in her and her life? Molly wonders why he is even there requesting her assistance. He is a graduate chemist and could probably figure out the calculations on his own. He says that he lacks the “practical experience”, but I think Sherlock enjoys Molly’s company and uses this as an excuse to spend time with her.