Stuck with program flow and freezing programm

unsigned int hourAc1On = 18;
unsigned int minuteAc1On = 0;
unsigned int hourAc1Off = 24;
unsigned int minuteAc1Off = 0;

//////////////////////holliday timer settings//////////////////////

////////////Room 1 (Bed 1) ///////////
byte room1MActive = 1;                     //Set to 1 if you want to process
                                           //Timer will be ignored when set to 0
unsigned int room1OnM[2] = {5, 35};        //Time to switch on the lights 5
unsigned int room1OffM[2] = {6, 5};       //Time to switch off the lights 6

byte room1O1Active = 1;                     //Set to 1 if you want to process
                                           //Timer will be ignored when set to 0
unsigned int room1On1[2] = {19, 35};        //Time to switch on the lights
unsigned int room1Off1[2] = {20, 15};       //Time to switch off the lights

byte room102Active = 1;                     //Set to 1 if you want to process
                                           //Timer will be ignored when set to 0
unsigned int room1On2[2] = {21, 5};        //Time to switch on the ;ights
unsigned int room1Off2[2] = {21, 15};       //Time to switch off the lights

////////////Room 2 (Bed 2) ///////////
byte room2MActive = 1;                     //Set to 1 if you want to process
                                           //Timer will be ignored when set to 0
unsigned int room2OnM[2] = {6, 30};         //Time to switch on the lights
unsigned int room2OffM[2] = {6, 50};        //Time to switch off the lights

byte room201Active = 1;                     //Set to 1 if you want to process
                                           //Timer will be ignored when set to 0
unsigned int room2On1[2] = {19, 30};        //Time to switch on the lights
unsigned int room2Off1[2] = {20, 10};       //Time to switch off the lights

////////////Room 3 (Bed 3) ///////////
byte room3MActive = 1;                     //Set to 1 if you want to process
                                           //Timer will be ignored when set to 0
unsigned int room3OnM[2] = {5, 50};        //time to switch on the lights
unsigned int room3OffM[2] = {6, 20};       //time to switch off the lights

byte room301Active = 1;                     //Set to 1 if you want to process
                                           //Timer will be ignored when set to 0
unsigned int room3On1[2] = {18, 10};        //time to switch on the lights
unsigned int room3Off1[2] = {18, 25};       //time to switch off the lights

byte room302Active = 1;                     //Set to 1 if you want to process
                                           //Timer will be ignored when set to 0
unsigned int room3On2[2] = {19, 15};        //Time to switch on the lights
unsigned int room3Off2[2] = {19, 40};       //Time to switch off the lights

byte room303Active = 1;                     //Set to 1 if you want to process
                                           //Timer will be ignored when set to 0
unsigned int room3On3[2] = {23, 20};        //Time to switch on the lights
unsigned int room3Off3[2] = {23, 35};       //Time to switch off the lights

///////////Room 4 {Living)
byte room401Active = 1;                     //Set to 1 if you want to process
                                           //Timer will be ignored when set to 0
unsigned int room4On[2] = {17, 30};         //Time to switch on the lights
unsigned int room4Off[2] = {23, 30};        //Time to switch off the lights

//////////Room 5 (bath 1)//////////
byte room5MActive = 1;                     //Set to 1 if you want to process
                                           //Timer will be ignored when set to 0
unsigned int room5OnM[2] = {5, 40};         //Time to switch on the lights
unsigned int room5OffM[2] = {5, 45};        //Time to switch off the lights

byte room501Active = 1;                     //Set to 1 if you want to process
                                           //Timer will be ignored when set to 0
unsigned int room5On[2] = {19, 55};         //Time to switch on the lights
unsigned int room5Off[2] = {20, 10};        //Time to switch off the lights

//////////Room 6 (bath 2)//////////
byte room6MActive = 1;                     //Set to 1 if you want to process
                                           //Timer will be ignored when set to 0
unsigned int room6OnM[2] = {6, 35};         //Time to switch on the lights
unsigned int room6OffM[2] = {6, 45};        //Time to switch off the lights

byte room601Active = 1;                     //Set to 1 if you want to process
                                           //Timer will be ignored when set to 0
unsigned int room6On[2] = {19, 50};         //Time to switch on the lights
unsigned int room6Off[2] = {20, 05};        //Time to switch off the lights

//////////Room 7 (bath 3)//////////
byte room7MActive = 1;                     //Set to 1 if you want to process
                                           //Timer will be ignored when set to 0
unsigned int room7OnM[2] = {6, 5};         //Time to switch on the lights
unsigned int room7OffM[2] = {6, 25};        //Time to switch off the lights

byte room701Active = 1;                     //Set to 1 if you want to process
                                           //Timer will be ignored when set to 0
unsigned int room7On[2] = {22, 50};         //Time to switch on the lights
unsigned int room7Off[2] = {23, 15};        //Time to switch off the lights

//////////Room 8 (bath 4)//////////
byte room8MActive = 1;                     //Set to 1 if you want to process
                                           //Timer will be ignored when set to 0
unsigned int room8On[2] = {22, 5};         //Time to switch on the lights
unsigned int room8Off[2] = {22, 20};       //Time to switch off the lights

//////////Room 9 (Kitchen)//////////
byte room9MActive = 1;                     //Set to 1 if you want to process
                                           //Timer will be ignored when set to 0
unsigned int room9OnM[2] = {5, 50};         //Time to switch on the lights
unsigned int room9OffM[2] = {6, 45};        //Time to switch off the lights

byte room901Active = 1;                     //Set to 1 if you want to process
                                            //Timer will be ignored when set to 0
unsigned int room9On[2] = {17, 45};         //Time to switch on the lights
unsigned int room9Off[2] = {18, 30};        //Time to switch off the lights

Do these REALLY need to be ints?

unsigned int switchState[25] = {0};           //array holding the state of each switch

On or Off needs an int?

  if(switchState[21] == 1){
    Serial.println("Setup");
  }

But, Serial.begin() is commented out.

  if(analogRead(lightSensor) > 0 && 
     analogRead(lightSensor) < 1024){ //checking if the reading

Since analogRead() returns values in the range 0 to 1023, this is useless test.

    int reading[15] = {0};            //declaring a local var to hold 
                                      //the readings
     for(int i=0; i<15; i++){         //take 10 readings
      reading[i] += analogRead(lightSensor);
    }
    //average the readings
    sensorValue = (reading[0] + reading[1] + reading[2] + reading[3] +
                   reading[4] + reading[5] + reading[6] + reading[7] +
                   reading[8] + reading[9] + reading[10] + reading[11] +
                   reading[12] + reading[13] + reading[14]) / 15;

There's a waste of 30 bytes. Set sensorValue to 0, then increment it by the reading divided by 10 in the loop. Then, divide by 15. There is no reason to store the data in an array.