Interface of XBee module with ATMEGA 168
A few problems:


init_devices() must be called from inside main() otherwise it won't be run
data = 0; and data = 1; do not send out the characters '0' and '1' respectively. They send out NUL and SOH: see http://www.asciitable.com, and these characters will show as nothing in a terminal emulator. Instead, enclose the values in quotes, e.g.   data = '0';, to send the characters '0' and '1' respectively.
Check the baud rate. With UCSR0A = 0x00; UBRR0 should be set to: (F_CPU / 8 / baud - 1) / 2; (source: Arduino serial library) where F_CPU is your CPU frequency in Hertz. With that in mind 005F seems like a funny value. Check the MCU frequency and calculate accordingly.


Some suggestions:


Funny characters on the serial output do suggest incorrect baud rate, however they do not always appear.
Download the Arduino IDE and have a look at / borrow their serial code.



  So my guess is that there is something wrong with hardware setup



Don't preempt your trouble shooting but deciding on what the problem is ahead of time, or you might miss the real issue. I still make this mistake! :)