Take a multimeter and measure the voltage at the output pin of your sharp sensor when there is no object in front of it. If the voltage at the output remains constant, then your sensor is perfectly fine and the problem is with your microcontroller. If the output voltage of the sharp sensor keeps rising even when there is no object in front, then the problem is with your sensor.
As suggested by waltr, do put filtering capacitors across your sharp sensor.
And finally, I guess you will have already taken this into consideration while writing the code - sharp sensors have a response time of around 40 ms, which means after you get a particular sensor reading, you will have to wait for another 40ms before you get the next reading.