Comme légumes nous mangeons des haricots verts.
gramatically correct, and what does it mean?
It would usually be written « Comme légumes, nous mangeons des haricots verts. » (note the comma), except that the construction is more "spoken French". I can't think of a more concise translation than « The greens (vegetables) we will eat are green beans ». It means that green beans (and presumably nothing else) will be served along with the meat.
The sentence is actually present tense, but I put it in future tense because "futur proche" can be expressed with present tense. If it is interpreted as present continuous, the sentence would mean that in the community or family no other vegetable is eaten, but I don't suppose that is what is intended.
EDIT: after reading other answers, a better translation is:
As for vegetables, we (will) eat green beans.
Comme + bare noun can mean "in the role of" or be a topic marker.
Some of the French usage is shared by English as, but they don't map out exactly the same:
He was hired as a door to door salesman = Il a été engagé comme représentant
We ate duck as entree = "on a mangé du canard en plat principal" or "Comme/en plat principal, on a mangé du canard" or "on a mangé du canard, comme plat principal"
A particular intonation pattern is required with the usage of comme post-verbally, hence the comma.
Used as topic marker, comme best translates as as (for) but sounds less awkward and its use is a lot more widespread:
Comme pain, je préfère le gris = As for bread, I like whole (bread) better
In "Comme légumes , nous mangeons des haricots verts", vegetables are viewed as an intrinsic part that each meal should have, so you can understand its usage as "in the role of".
It's also topic-fronted, so that sentence exemplifies both functions quite well.
I feel like a as for contruction would be too literal a translation of this sentence. Maybe "The vegetables for this this meal will be green peas", which preserve the Topic - Verb - Comment structure of the French sentence in a way that is more natural for English.
Like all topicalisation devices, the use of "comme + bare noun" is extremely widespread in spoken conversation, and a lot rarer in formal texts, but that doesn't mean it can't be used in a formal context. You can easily imagine a posh restaurant's menu having a sentence like: "Comme champagnes, nous vous proposons une collection de grands crus spécialement sélectionnés par notre sommelier" which still sounds very formal.
The sentence is definitely understandable and almost grammatically correct — specifically, punctuation is incorrect — missing a comma after comme légumes. Translated, it means "As for vegetables, we eat string beans." A bit colloquial.