This verse contains two loosely connected sentences. They form the first and the second lines of this verse respectively. The first sentence can be further subdivided into two sentences. They are: 1) kanhaj dhammaj vippahaya (having abandoned the bad states). The subject is omitted in this segment, pointing to the subject of the second sentence (see below). The gerundive vippahaya (having abandoned) serves as the verb. The object is the noun dhammaj (state, accusative singular) with its attribute, the adjective kanhaj (dark, bad, accusative singular). 2) sukkaj bhavetha pandito (let the wise man develop the good states). The subject is the word pandito (wise man, nominative singular). The verb is bhavetha (let him develop, 3rd person, singular, medium, optative). The object is the word dhammaj from the previous sentence. It has the adjective sukkaj (good, bright, accusative singular) as an attribute. In the second sentence, the subject is omitted, implying the subject of the previous sentence, the noun pandito. The verb is agamma (having come, gerundive). There are two objects. One is the noun anokam (to the houselessness, accusative singular) with its attribute, the noun oka (from the house, ablative singular). The second one is the noun viveke (in the solitude, locative singular). This word has an attribute clause yattha duramaj (where it is difficult to enjoy oneself). In the clause, the subject is the adjective duramaj (difficult to enjoy, nominative singular). The relative adverb yattha (where) connects the clause to the word viveke.
A group of monks came to see the Buddha and asked him for advice on meditation. The Buddha advised them with this verse and with the two following ones (DhP 88, DhP 89). In order to be able to devote oneself completely to the practice of meditation, one must "give up the bad states". These are evil deeds, evil thoughts. Then one must develop "good states", or good deeds and good thoughts. If one wants to practice wholeheartedly, it is very good to "go the houselessness", or in other words to became a monk or a nun and meditate diligently in solitude. That is extremely difficult, because in solitude there is nothing "to enjoy", nothing for our mind to occupy itself with, we are left only with ourselves and have to concentrate on the practice.