To a certain extent there is a flaw in the question, you may as well ask why carbon is black and soft. Graphite is grey and soft, amorphous carbon is black and soft, diamonds are clear and hard. White phosphorus is waxy and very soft, purple and black phosphorus are brittle and harder, but I don't know how much harder. In general the more cross linking, the harder the material. Small molecules held together by weak forces tend to be soft, big covalent lattices tend to be hard.
If in doubt, assume hard and soft refer to mohs scale, i.e. what scratches what.