Well, in the flabébé line, it simply indicates what flowers were available for her to choose. Remember, the flower is not actually part of flabébé’s (or floette’s) body; rather, she picks one that resonates with her and carries that with her throughout her life. It’s just that for such a tiny pokémon as flabébé, sometimes only red flowers, orange flowers, or so forth are within her reach. If she’s from a field with multiple types of flowers, however, then the blossom is definitely a specimen she feels the most drawn to.
When it comes to other color variations, however, it’s largely environmental. For example, shellos from the eastern part of Sinnoh are blue, whereas shellos from the western part are pink. This is because the waters of the eastern half of Sinnoh are mostly clear and blue (making it harder to spot shellos as it travels across the ocean bottom), whereas there are pink corals located in the western half (meaning shellos blends in with its environment far more easily if it’s pink). Alolan pokémon are generally the same way in that most of them take on different forms or colors because these alternative forms provide some kind of adaptive advantage to them.
Alternatively, as with vivillon or Alolan exeggutor (to name a couple), the environment triggers biochemical changes in the subject that results in variations of form or color. For example, the reason why the “icy snow” variation of vivillon is monochrome is because that particular vivillon was raised in a colder climate, where days are far shorter. As a result, it isn’t able to develop the pigmentation it needs to take on bright colors. By contrast, the “ocean” variation is brightly colored because it was hatched and raised in a particularly warm, sunny place. Meanwhile, the “ocean” variation and the “archipelago” variation come from similar climates, but due to differing food sources, they have vastly different colorations. Granted, it should also be noted that taking an ocean vivillon’s egg from its home region, hatching it elsewhere, and raising the resulting scatterbug in a region with a completely different climate will still result in an ocean vivillon, but this is because the form difference is genetic. The same would happen if you took the egg from Alolan pokémon and hatched it outside of Alola or took an egg from a western shellos and hatched it in East Sinnoh.
In short, when it’s not simply due to a pokémon’s conscious decision, differing colors (and forms) within a species usually indicate adaptations to vastly different environments. It’s very much like how humans may look vastly different from one another because all of us were descended from vastly different populations in vastly different environments.