The value of shares is determined based on the company's valuation, which can be calculated through various methods like discounted cash flow (DCF), comparable company analysis, or precedent transactions. Early-stage companies often rely on investor negotiations to set share prices, while publicly traded companies have their share prices determined by the market.