Their primary advantage is in numbers. A single such probe would hardly be useful.
As a swarm, they could cover a large area, network together (just relay communication to next probe in range) and depend on a larger probe to pass data back to Earth. They could be used to map various fields - magnetic field, gas distribution, acting as a really big radiotelescope array, map chemical composition of objects (asteroids etc) and so on.
Unlike sensors that can either depend on reflected radiation (camera, radar, ultrasound, emission spectrum) or examine just local properties of given object/space right where they are, a swarm of nanoprobes areis good for mapping large area for properties that can't be sensed remotely, or for compiling a wide-angle reception of reflected radiation that varies with angle. Also, thanks to numbers, they'd be efficient in pinpointing interesting locations for more detailed analysis - e.g. finding unique chemicals in the vicinity, and monitoring large areas for changes.