I use the colored stakes to identify the different plants. The colors don't really mean anything, just makes them easy to find. I used to use plain stakes but they were sometimes hard to find when things grew up so i started painting them. I've learned not to use red or orange with tomatoes or yellow with certain things. You can get all excited when you see the color then realize it's just the stake.
I use an outdoor spray paint to lay down a base, write whatever I want on them with a Sharpie, then cover that with an outdoor marine polyurethane so it doesn't fade. Just putting the polyurethane over the writing on a plain stake would last until the end of the season. Sometimes just the Sharpie can fade if it is in the sun.
If I sow seeds it tells me where the seeds are. Or maybe the variety of tomato or pepper. Some kind of marking is really helpful when I grow those different varieties of beans for seed for the bean network. When other people pick certain things when I'm gone in a trip I can direct them to certain things and away from others. I would not want them to pick my dried beans for green beans, for example. And part of it is just me having fun with it.