There isn't much of a special reason for Sentret's yellow appearance in Gen 3 and 4. Lots of Pokemon have received color changes or other design modifications over the years—for instance, Gligar appeared as a more cool-toned lavender color for some time, while Gengar had a pinker coloration.
Although some design changes are known to have a particular motive (most infamously, Jynx's change from black to purple), there isn't a known story behind this one. It could be speculated that some of the color changes during Gen 3 in particular were possibly to make use of the improved color display of the Game Boy Advance, but that's just a guess.
Normal Sentret has remained canonically brown throughout the years. Depictions in the anime and on cards from around Gen 3 and 4 still show a brown coloration, and Sentret is categorized as Brown in the Pokedex, so the yellow coloration in the games was probably intended to be interpreted as bright sunny lighting rather than yellow fur.