The development of smart grids has revolutionized modern energy markets, enabling users to participate in demand response (DR) programs and maintain a balance between power generation and demand. However, users’ decreased awareness poses a challenge in responding to signals from DR programs. To address this issue, energy management controllers (EMCs) have emerged as automated solutions for energy management problems using DR signals. This study introduces a novel hybrid algorithm called the hybrid genetic bacteria foraging optimization algorithm (HGBFOA), which combines the desirable features of the genetic algorithm (GA) and bacteria foraging optimization algorithm (BFOA) in its design and implementation. The proposed HGBFOA-based EMC effectively solves energy management problems for four categories of residential loads: time elastic, power elastic, critical, and hybrid. By leveraging the characteristics of GA and BFOA, the HGBFOA algorithm achieves an efficient appliance scheduling mechanism, reduced energy consumption, minimized peak-to-average ratio (PAR), cost optimization, and improved user comfort level. To evaluate the performance of HGBFOA, comparisons were made with other well-known algorithms, including the particle swarm optimization algorithm (PSO), GA, BFOA, and hybrid genetic particle optimization algorithm (HGPO). The results demonstrate that the HGBFOA algorithm outperforms existing algorithms in terms of scheduling, energy consumption, power costs, PAR, and user comfort.