These green worms are cendol (pronounced chen-dul), made from green pea flour flavoured with pandan leaves. They’re essential for making the dish that is their eponym: a combination of the worms, shaved ice, santan (the first extraction of coconut milk), gula (palm sugar) and often red beans. With a dish so simple, the only key is finding a vendor who uses top quality ingredients.
The same vendor selling the cendol had (what I’m guessing are) tapioca pearls, dyed red. From a distance I thought that they were pomegranate arils, but on closer inspection, they clearly were not.
See Also: The Star Online provides a recipe for cendol.