In plain words
One who is unattached everywhere, and on meeting either good or bad neither rejoices nor hates, has wisdom firmly established.
Word for word
Who is without attachment everywhere, and meeting this or that, good or bad, neither rejoices nor hates, his wisdom is firmly set.
The commentators
Bhagavadgītābhāṣyam
किञ्च —
यः मुनिः सर्वत्र देहजीवितादिष्वपि अनभिस्नेहः अभिस्नेहवर्जितः तत्तत् प्राप्य शुभाशुभं तत्तत् शुभं अशुभं वा लब्ध्वा न अभिनन्दति न द्वेष्टि शुभं प्राप्य न तुष्यति न हृष्यति, अशुभं च प्राप्य न द्वेष्टि इत्यर्थः । तस्य एवं हर्षविषादवर्जितस्य विवेकजा प्रज्ञा प्रतिष्ठिता भवति ॥ ५७ ॥
In plain words
And there is more to say —
The sage who, in every situation — even regarding his own body and life — carries no attachment: whatever comes his way, good or bad, he neither celebrates nor recoils from it. When something good happens, he isn't thrilled; when something bad happens, he doesn't hate it. That is the meaning. And it is precisely because he stays free of both elation and dejection like this that his discriminative wisdom becomes firmly established.
Close to the Sanskrit
Moreover —
The sage who, everywhere, even regarding body, life, and the like, is 'without attachment,' devoid of attachment — having obtained this or that, good or bad, having gained this or that, good or bad — 'neither rejoices' nor 'hates': having obtained something good, he is neither pleased nor delighted; and having obtained something bad, he does not hate it: such is the meaning. Of him, thus devoid of elation and dejection, wisdom born of discrimination becomes established. [End of commentary on verse 57.]