Please read something about using pin's pullup and pulldown.
With your connection the potential on the pin 7 will be free floating when the switch is off, so the digitalRead() can returns any value, depend on electromagnetic noise.
what happens when the button is not pressed is that the green wire behaves like an antenna connected to your pin 7 and you read whatever electromagnetic field is in the air because there is nothing forcing pin 7 to GND.
if you use INPUT_PULLUP instead of INPUT for your pin, then you force the signal HIGH internally in the microcontroller so if you connect the other end to GND then you'll read HIGH when not pressed and LOW when pressed. see https://www.arduino.cc/en/Tutorial/BuiltInExamples/InputPullupSerial