Do I need to connect the battery to send data to an ESP32 chip?
You need at least a battery or other DC power supply to power it up. You said you have a “chip” which sounds like just the ESP32 MCU without any supporting peripherals.  You will also need a crystal and some means of programming the ESP32 MCU.

Try searching for “esp32 minimal circuit”.  There’s a lot of existing info available.

For early stage prototyping, I would recommend getting a ESP32 dev board with USB so you have a working reference as a starting point, as they’re inexpensive and it will get you going faster with the basics, while you learn and prototype with the chip.