I want to configure Xbee s2 pro using arduino .Is it possible to design code (similarly used in putty) inorder to configure it?
Yes but you should have some understanding of the XBee API. I highly recommend the book Building Wireless Sensor Networks by Rob Faludi. He also has a website with code examples from the book.
http://www.faludi.com/bwsn_book/code/
There are also Arduino libraries that have been written to take care of some of the drudgery. I haven't tried them but the one I see recommended is GitHub - andrewrapp/xbee-arduino: Arduino library for communicating with XBee radios in API mode