Snow, sleet and freezing rain can all come from the exact same storm, sometimes within a few kilometres of each other, and what separates them isn't the storm itself. It's the precise shape of a temperature profile running from the cloud where the precipitation forms down to the ground, and in practice that profile can be genuinely difficult to forecast with confidence.
The starting point: it's rarely just about the surface temperature
Checking whether it's above or below freezing at ground level tells you surprisingly little on its own. What actually determines the type of precipitation reaching the ground is the full vertical temperature profile of the atmosphere above that point, because precipitation usually starts life as snow high in the cloud, however warm it might be at the surface, and what happens to it on the way down is what decides its final form.
Pure snow
For snow to reach the ground as snow, the entire column of air it falls through, from where it forms all the way down to the surface, needs to stay at or below freezing. If that holds, the ice crystals that formed aloft never melt and arrive at the ground still as snow. This is the simplest of the four outcomes to forecast, because it only requires one condition to hold true throughout the whole depth of the atmosphere, rather than a delicate balance between layers.
Sleet: melt, then refreeze
Sleet happens when that simple picture breaks. If falling snow passes through a layer of air above freezing partway down, the snowflakes begin to melt. If that warm layer is followed by a deep enough layer of sub-freezing air closer to the ground, the partially or fully melted drops have enough time and enough cold air to refreeze into small ice pellets before they hit the surface. Because sleet involves both melting and refreezing, it typically takes considerably more total precipitation to produce a given depth of sleet than the equivalent depth of pure snow, which is part of why sleet events often look less dramatic on the ground than the amount of moisture involved would suggest.
Freezing rain: melted, but no time to refreeze
Freezing rain forms from almost the identical setup as sleet, a warm layer aloft that melts falling snow into rain, but with one crucial difference in what's waiting below it. If the cold layer of air sitting near the surface is too shallow, the melted raindrops simply don't have enough time or enough cold air to refreeze back into ice before they reach the ground. Instead, they arrive as ordinary liquid rain that happens to be supercooled, chilled below freezing point but still liquid, and freeze on contact the instant they touch a cold surface: a tree branch, a power line, a road, a windscreen. That's what produces an ice storm, arguably the most disruptive of all winter precipitation types, because it coats everything in a solid layer of ice rather than simply piling up snow that can be shovelled or ploughed.
So the difference between sleet and freezing rain, despite how different they look and behave, often comes down to nothing more than how thick one shallow layer of cold air is near the ground. A deep enough cold layer produces sleet. A shallow one produces freezing rain instead, and that boundary can sit within just a few hundred metres of atmospheric depth.
Where this typically happens
In a classic mid-latitude storm system, these different precipitation types tend to line up in bands running roughly parallel to the storm's warm front. Snow falls furthest from the front, where cold air extends all the way up through the atmosphere. Move closer to the front and a shallow warm layer starts to appear aloft: first sleet, where the cold layer below is still deep enough to refreeze the melted precipitation, then freezing rain, where that cold layer has thinned out too much to finish the job. Closer still to the front, the warm layer extends all the way to the ground and the precipitation simply falls as ordinary rain. In practice this means all four precipitation types can exist simultaneously across a single storm system, sometimes separated by only a short distance on the map, which is exactly why winter storm forecasts so often come with genuine uncertainty about which side of a town or even which suburb will see snow, sleet, freezing rain or plain rain.
Why it's such a difficult forecast
Because the difference between these outcomes can hinge on a layer of air only a few hundred metres deep being a couple of degrees warmer or colder than expected, mixed winter precipitation events are consistently ranked among the hardest forecasts in meteorology. A small error in predicting the depth or temperature of that shallow cold layer near the surface, well within the normal margin of error for a weather model, can be the entire difference between a town getting a foot of powder and that same town getting a coating of ice that shuts down roads and drops power lines. It's a genuine case where the forecast isn't uncertain because the storm itself is unpredictable, but because getting the precipitation type right requires nailing the temperature structure of the atmosphere with a level of vertical precision that's inherently hard to achieve.