A child asked him what the grass was, and he couldn't answer, except to guess that grass must be the symbol or "flag" of our hopeful nature. Green is the color of hope.
Or, it could be like God's handkerchief, just a little something to remember him by.
Or, it could be the child of all the other plants.
Or, it could be a "hieroglyphic," a kind of writing that symbolizes the equality of all people and things. After all, the grass grows the same everywhere, and for everyone. (Or so he thought. Shmoop's lawn in California doesn't do so well…)
Or, it could be like "hair" of graves. This line seems pretty unexpected. The idea is that things are being born and dying so often that all grass must be covering some kind of grave. More generally, the soil itself is a "grave" that everyone returns to eventually.
Whitman thinks about what kinds of people might have been buried in the soil beneath him, whether they were young men, mothers, or small children who died too soon.
The grass comes from the mouths of dead people, like so many "uttering tongues." He wishes he could translate what they were saying.
Finally, he decides that people don't ever fully disappear, perhaps because we all belong to the same web of life, and that death itself is not such a bad thing.