First off, there are lots of different ways organisms can glow, luminescence, fluorescence, and phosphorescence are all subtly different ways for organisms to produce light. I'm going to assume you just care about having glowing plants of any sort and so will focus on evolutionary reasons for "why" they might glow instead of "how". (Although the "how" is pretty easy, they just make the appropriate proteins).
Light is primarily used as a signal by living things. The most likely reason for plants to make light is to try to communicate a message to other organisms. But what would a plant want to say? Lots of things! I'll give a few examples that came to mind below.
Attracting symbionts: Many plants already produce flowers with bright colors in order to attract insect pollinators. It's not a far stretch to suggest they might emit light at night in order to attract nocturnal insects.
Warning predators: Aposematism is a fancy term for the use of warning colors. Lots of animals utilize bright coloration to advertise the fact that they are poisonous, or foul-tasting, or otherwise unpleasant to potential predators. Some plants use their coloration in this way already. Plants could step up their warning game by emitting light as well if they felt so inclined.
While the two above suggestions would work, they are simply extrapolating from existing visual cues that plants use. The following are some more... creative suggestions.
Self-defense: Plants suffer from all sorts of small parasitic insects like aphids and caterpillars. Imagine if in response to injury plants glowed in the affected area. The glow would serve to attract predators that would eat the insects eating the plant. The dark insects would be highlighted against the glowing plant leaf or stalk.
Synchronizing something: Another suggestion is for plants to communicate with each other. Perhaps they want to synchronize their flowering times, or pollen release. Plants are known to be sensitive to light in many ways already, from phototropism to knowing what time of year it is. A glowing forest could help synchronize them all.