First, shield your sensor cables from other wires to cut down on interference. Taking an average of several readings in your code can help smooth out the junk. On the hardware side, a cheap capacitor between the signal pin and ground often cleans things up. Bad power supplies often cause this, so try a different USB adapter. Last, check for loose wires or bad contacts, as that's usually where the noise comes from.