What determines whether a household device needs a grounded plug?
While the case may be made of plastic the output connection of the power brick and the data connections in and out of the laptop are not designed as mains connectors and frequently have touchable metalwork, even where there is insulation on said data connectors and cables it is not designed to meet mains insulation standards. So the output side of the power supply must be sufficiently isolated from the mains to satisfy the safety regulators.

The isolation in a modern power supply is typically provided by a high-frequency transformer as part of a switched-mode converter. Unfortunately this transformer has stray capacitance and said capacitance interacts with the switching action of the converter to create high-frequency signals between input and output.

This would be very bad from an EMC perspective, so to suppress the high-frequency signals deliberate capacitance is added between input and output sides of the converter. Unfortunately these capacitors inevitably leak some low frequency AC too.

In a class 2 (non-grounded) design this leakage current will flow through anything that connects the output side of the power supply to ground, for example the user. As you can imagine there are therefore strict limits on the leakage current.

In a class 1 (grounded) design on the other hand the leakage current can be diverted to mains ground, either by grounding the output or by splitting the suppression capacitance into two capacitors in series and then grounding the midpoint of the capacitors. 

The larger a power supply gets the harder it is to make a class 2 design that will satisfy both the safety regulations and the EMC regulations at the same time. 

Grounding a power supply obviously has costs, there is an extra pin on the input connector, an extra wire in the power cord, an extra pin on the plug and perhaps most importantly a wider variety of plug types. A grounded design is also more-prone to misuse.

The result of this is that small power supplies like phone chargers are non-grounded while large power supplies like desktops PCs are grounded. Things like laptop chargers, TVs etc are in the middle ground where both approaches are reasonable.