"The bananas are yellow."
Translation:केले पीले हैं।
It's because of the definite article 'the' in the english sentence. It tells you that the sentence is not a generalization and is talking about some specific bananas.
If the other sentence was indeed "The grass is green" then the correct translation would be 'घास हरी है'. 'घास हरी होती है' is the translation for 'Grass is green'.