Many games on PS4 changed the color of the light bar, either to correspond to events in the game, or (particularly in multiplayer games) to match the color or icon of a player's character or icon. I assume PS55 games will treat the lights on the DualSense in a similar manner.
Yes, it was used for VR. More specifically, it was used in conjunction with the PlayStation Camera, even before PSVR was available. The position, orientation, and color of the light bar could be "seen" by the PS Camera, and (along with gyro and accelerometer) would aid the system in locating players in motion-controlled games.
This would be useful for accessibility purposes. Color-blind players might be able to recognize that one ore more lights are glowing in certain locations on the controller, even if they are unable to discern the difference between the actual colors of the lights.