My first AVR C program- LED not blinking
int main(void)
{
    clock_prescale_set(clock_div_128); //set the clock to use the 8MHz internal clock divided by 128 for an internal frequency of 250KHz, consumes 0.4mA while not sleeping.

    while (1) 
    {
        PORTD4 == 1;//Set pin 13 of the micro to high.
        _delay_ms(1000);
        PORTD4 == 0;//Set pin 13 of the micro to low;
        _delay_ms(1000);
    }
}


The problem is how you "set" the port, you are using == which is a comparison operator, not an assignment. Try just using =.

void main()
{
    DDRD = 0xFF;         //PD as output
    PORTD= 0x00;         //keep all LEDs off

    while(1)
    {
        PORTD &amp;= 0b11110111;       //turn LED off
        _delay_ms(500);   //wait for half second
        PORTD |= 0b00001000;       //turn LED on 
        _delay_ms(500);   //wait for half second
    }        
}


You may also have to set the direction of the port somewhere. You would do this by setting the DDRD to be 0b00001000, which should set Pin 4 of Port D to an output.