Dgitial Pin status affect sensor value

Okay, I understand your question now.

The most common things I like to know in this situation: what sensor (with link, copy the url); which arduino board; how is it powered; how is the ground connected; full sketch; code tags.

You gave the full sketch, that's good.
Did you know about the code tags ? You can paste your sketch in the text between the code tags. Above the text input field are buttons. The '#'-button is for the code tags.

About the power supply. If you use USB power, the 5V could drop a little if the led is on. That would immediate have influence on the analogRead() of the sensor. The default setting for the Arduino is an analog reference equal to the 5V. The input range will be full range of 0V to 5V. If the 5V changes, so does the value read by analogRead().
You could try a external power supply to check this.

The digital MPU-6050 doesn't have this problem ofcourse. But you need a library to get the thing working for you.