There are some rough prices that things are likely to sell for (on average) but it's the same as real life really. People will buy things over the odds if they really need them or can't be bothered to barter. On the flip side of that, items will sell cheaper if the seller is desperate for cash or if the buyer is buying in bulk they'll usually expect a discount.
Visit peoples shops, check their prices and ask around. Ignore all the prices that you see at the market, no one is gonna buy a diamond, or any other item (excluding glowstone) for the extortionate price the market sells them at.
You'll soon get an idea of when you're getting a good/bad deal.