James Allen's analysis of what went wrong for Hamilton:
http://www.jamesallenonf1.com/2015/...-went-wrong-with-mercedes-pit-call-in-monaco/
The short version is that the team assumed the safety car would be lapping at a rate consistent with the delta time - but it wasn't, because they wanted the other drivers to form up behind it. So because Rosberg and Vettel weren't pinned behind the safety car, they could lap faster than Hamilton and still be within the delta time. It's a silly error to make, but since GPS doesn't work around Monaco, to procedure is different and much harder to calculate.
As for Hamilton, he was trying to make a call based on the information he was picking up from trackside broadcasting and was lobbying the team for the stop.