XBEE S2 RPSMA not working with batteries
Assumption

Assuming you use this XBEE shield, when you check the circuit diagram, you'll notice that there is voltage regulator MC33269. 

Cause of malfunction

Although MC33269 is an Low Drop regulator, it is spec'd for 1 ~ 1.35V dropout voltage. This means that if you supply 3.7V from your battery an extra 1 ~ 1.35V will be dropped for the XBEE, resulting in 2.4 ~2.7V supply voltage. Depending on which XBEE datasheet I check, the minimum required voltage ranges from 2.1 ~ 2.8V or even 3V for the pro version referenced in the first example. 

What to do

In other words carefully check the power supply voltages with a voltmeter against the correct datasheets for all modules, XBEE, Arduino and your other sensors.