If B vitamins become discolored or soften due to humidity, they are probably safe to consume, although they have very likely lost at least some of their effectiveness, according to the New York Times. B vitamins, along with other water-soluble supplements, degrade when exposed long-term to excessive humidity.
The New York Times explains that the scientific term for this degradation process is deliquescence. This fact makes locations that often have high humidity, like bathrooms and kitchens, bad spots to store vitamins. Even storage in tightly closed bottles does not eliminate the problem, since humidity enters the bottle when it is opened.