When I am testing the circuit with 5V USB 3.0 power supply, the zener diode and/or resistor does not build heat up. Using the 18650 7.4V battery makes it build heat. The ATMEGA328P only use its TX and RX pins so I am just using minimal current in that part. Why is it that using 18650 7.4V battery makes the resistor/zener diode heat up so much?
Why area you powering the ATmega at 5v?
It will operate at 3.3V (1.8V - 5.5V) and you can get rid of the zener.
The resistor gets hot because that's its job.
To alleviate thermal stress from the zener.
Now, I notice the voltage regulator with input 7.4V heats up faster.
You should use an LDO regulator.
This LT3070 has a 85 mV drop out @ 5 A, and under 10 mV @ 300 mA.
Same thing applies to the voltage regulator.
If it gets too hot, you add a power resistor between the battery and the regulator.
Estimate the max current. Do not underestimate.
You want to reduce the voltage into the LM7805 by about 2V at max current.
The resistor value is 2V ÷ max current.
I use a ceramic wirewound resistor for this purpose.
You should not use linear voltage regulators in a battery powered project.
For good efficiency at low current I use a TI Simple Switcher LM46002
It's a little pricey ($2-$4) but efficiency costs.
You can use TI's WebBench to tweak the efficiency, calculate component values, and create a BOM.
WebBench will also suggest other parts.
Are you powering the circuit through the LM7805 when it's hooked up to the USB supply? LM7805 requires about a ~2V headroom (ie +7.0VDC in in order to regulate +5.0 out at 1A). So you may not actually be running that zener regulator at 5V input- check your 5V rail to verify. With the battery you now have 5V and that resistor is going to get warm. Note that wattage ratings on resistors often assume a pretty high heat rise, I don't know what package (SMT/through hole) you're using but it can get uncomfortably warm with a 1/2W dissipation rating.