Here is a link to write/read 'type long' to EEPROM
https://playground.arduino.cc/Code/EEPROMReadWriteLong
At power up, read the OnTime and OffTime from EEPROM.
now i want to add code to increase and decrease ontime and offtime of the counter using switches
You will need 4 switches.
incOnTime
decOnTime
incOffTime
decOffTime
When you change Ontime or OffTime, start a timer for ~10 seconds.
When the 10 second timer finishes, store the two times (once only) to EEPROM