Generally, for publicly traded companies it is easy to compare stock prices, which should reflect the future value, or earning potential, or a company.
If they are privately held, or you have limited information, you can always look at a business on 3 main factors:
1. Margins (how profitable are they)
2. Growth (how fast have sales been growing and what are the prospects)
3. Return on Equity (is the business capital intensive or not, and what kind of return is earned on each new dollar invested in the company)
Of course, this is a limited set of analysis, and any company should be looked at intensively before making an investment.