When you love someone for the sake of Allah, it means that you love them only because of their closeness to Allah (subhana wa ta’ala). Perhaps you feel inspired by their devotion, or you feel indebted to them for their having brought you closer to Allah, or you see them practicing a high standard of Islamic behaviour and that makes you love them. Loving someone for the sake of Allah is not something you can always explain. However, when you love someone for the sake of Allah then you desire no personal benefit from that person, your love is unselfish, and it is related to your love of Allah (subhana wa ta’ala).
This hadith tells us how to respond should we be the person to whom someone expresses their feelings of love. It may be that you don’t really know that person and so saying “I love you too” would be untruthful. But you beautifully appreciate the other’s feelings and pray for him/her with these words, “May Allah love you for whose sake you entertain feelings of love for me.” And it is so much better for that person too to be loved by Allah rather than anyone else!