Companies will list their inventory at the lower of:
1) what they think they can sell it for
2) what it cost them to make it
What it cost them (#2) can include the raw materials they required, the labour costs, energy costs, and anything else that might have contributed to the end product.
But this listing of the lower of these two components is a little bit conservative. Sometimes, inventory is worth a whole lot more than what is shown on the financials.
Consider an oil company currently pumping oil out of the ground. It may not be costing them much to pull the oil out (resulting in a low inventory value on their balance sheet), but the value of their inventory could be astronomical. So where prices fluctuate (common for commodities), you have to keep an eye out and make sure you understand the underlying value of the inventory.
Another example where inventory is understated is when a company has particularly high gross profits. Consider Harley-Davidson throughout the late 90's. They had waiting lists for their vehicles, resulting in people willing to pay a lot more for the vehicles than the raw materials and labour required to put them together. As a result, the value of their inventory was actually a lot more than you would think if you just looked at the balance sheet.
When comparing inventories across companies, you also have to keep in mind different methods companies use to calculate their ending inventories. The two most common methods are FIFO and LIFO; a good article describing them is listed here, therefore I won't get into it here.