void loop(){
if (digitalRead(button1) == LOW){
digitalWrite (ledPin, HIGH);
}
if (digitalRead(button2) == LOW){
digitalWrite (ledPin, LOW);
}
}
In setup():
pinMode (buttonX, INPUT_PULLUP);
Wire the button so the pin connects to Gnd when pressed.