Co-sleeping in itself is not unsafe. The current theory of cot death/SUDI is that you have a baby at a vulnerable time in its development (around the 3-4 month mark), in a vulnerable situation, with a baby who has inherent vulnerablities. So, babies who were low birth weight, premature, small for dates, admitted to special care after birth-thats the inherent vulnerabilities group. Put that baby in a vulnerable situation-co sleeping with a parent who has been smoking or drinking, and they are more likely to be at risk. Put that baby in that situation at that vulnerable time in development, and the risk is even higher-its like a Venn diagram when all three groups overlap. Its called the 'triad' theory.
If you have a perfectly healthy normally grown baby at a vulnerable time co-sleeping with a healthy non-smoking parent, their risk is far lower. A baby at 12 months, far outside the vulnerable time frame, co-sleeping with parents who don't smoke, their risk is absolutely minimal.
So, if you plan co-sleeping carefully, you can significantly reduce your risks. The risk is highest when the fatal co-sleeping event is unplanned-this is a baby who was in his cot, parent had a few drinks or took drugs, swooped the baby up for a cuddle and accidentally fell asleep. Planned co-sleeping is not risky as long as you plan ahead. Not smoking and not drinking means you've reduced the two biggest risks there and then.
Other risks-make sure the room isn't too hot (babies prefer 16-18 degrees), make sure there aren't big heavy duvets or spongy mattresses, don't block your baby in with fluffy pillows, they won't come to harm rolling onto the floor from the bed, but they might if they roll into a pillow and can't roll out. Make sure the bed is well away from the wall so the baby can't get wedged between the bedframe and the wall, make sure that the baby can't fall down a 'gutter' between two pillows. Make sure they aren't over dressed or wrapped, make sure the sheets fit tightly and won't get entangled around the squirmy little critters. Basically, given that babies are sweaty, leaky, smelly wriggly little gits I have no idea why anyone wants to sleep with them, but co-sleeping isn't dangerous as long as its planned and managed, and you never do it if you've had alcohol or drugs.
The trouble is, the public health message has to be clear-if it said 'You can sleep with your baby if you do this, this, and this, but not if you do that, unless you do this as well', it would be confusing and difficult for some families, so it has to be clear and unmistakable, so it ended up as 'don't sleep with your baby at all'.