If a person forgot to turn the lights on before sunset on Friday afternoon, or to turn on the stove or air conditioning, once the sun sets he may not turn on the lights or appliance or perform any activity forbidden on Shabbat. This includes activities forbidden by Torah law as well as those proscribed Mi'de'rabbanan (by force of Rabbinic enactment).
However, during the period of Bein Ha'shemashot ("twilight"), which extends for 13.5 minutes after sundown, one may ask a gentile to perform Melacha (forbidden activity) on his behalf when this is necessary for the fulfillment of the Mitzva. This would include turning on the lights or stove for the Shabbat meal. This rule applies as well during Bein Ha'shemashot on Saturday night: during the 13.5 minutes after sundown on Saturday night, one may ask a gentile to perform a Melacha necessary for the fulfillment of a Mitzva, such as bringing the Havdala supplies to one's home through a public domain.
See Halichot Olam, Helek 3, pages 73-74.