PushButton as LED Switch (does not work) #define LED 1//This pin goes to the LED  
 #define SWITCH 7//From Switch$  

void setup() {  
      pinMode(LED,OUTPUT);  
      pinMode(SWITCH,INPUT);  
}  
int state=0;//Initializing values of all three  
int val;  
int lastval=LOW;  

void loop(){  
      val=digitalRead(SWITCH);//Reads if switch is on or off  
      if(val==HIGH&amp;&amp;lastval==LOW){//Basically activates if the button was just pressed  
        state=1-state;//Changes state after button is pressed  
        digitalWrite(LED,state);//Enforces changed state to LED on or off  
        delay(50);//Just a simplistic debouncing  
      }
      lastval=val;//Store last value  
}
Based on your response to my comment, it sounds like you have a floating input.  When the button is NOT pressed, the pin isn't connected to ground or 5V so it is floating and picking up whatever stray electrical signals happen to be bouncing around the room.

The easiest way to handle buttons on an Arduino is to wire them between the pin and ground.  Then in the code you use INPUT_PULLUP instead of INPUT for the pinMode call.  Once you've done that then the pin will reliably read HIGH when the button is NOT pushed and will read LOW when the button IS pushed.  Note that this is backwards of how newbies tend to think, but is really the more common way to handle a button.