It means that a person has an absolute right to some present or future interest in something of value. When a right has vested, the person is legally entitled to what has been promised and may seek relief in court if the benefit is not given.
In your example, David was not vested, meaning that he was not legally entitled to his shares of the company.