I suggest you that NS2 is better choice for Wireless sensor network if you want to work on physical, Data Link Layer especially MAC and Network layer. If you want to work on transport and application layer, then NS3 is highly suitable.
well you can use both NS2 yyou have to know about the tcl scripts and in NS3 which is advance version of NS2 you have to deal with C/C++. so it depends upto you.
Regarding WSN yes you can simulate but you should be specific that what piece of WSN you are interested in
I suggest you that NS2 is better choice for Wireless sensor network if you want to work on physical, Data Link Layer especially MAC and Network layer. If you want to work on transport and application layer, then NS3 is highly suitable.
I were using NS-3 for a while and build some protocol models on it. But I never touched NS-2 because it is too old. Maybe you need to clarify your target first, even separate the WSN simulation into several small points. From my point of view, it is still challenging to simulate a whole WSN protocol stack on both NS-2 and NS-3. Especially, you have to check every single line of their source code. So if you love coding like geeks, the two platforms can help you find lots of fun. But if you have heavy research or teaching work and pressure of finishing your thesis, please to consider the study curve, expected project time, existing needed models based on your target and your own experience.
It depends on what your objectives are. In case you intend to simulate the existing or contributed models of WSN in NS2 or NS3, you simply have to write a script in TCL or C++ respectively. In case you intend to deploy your own algorithm for WSNs, then you have to undergo some coding. The advantage of NS2 over NS3 is that it has more contributed models. However, in NS2, you have to make associations in the code you write to relevant TCL variables. On the other hand, the documentation of NS3 is much better and you only have to write the code in C++ and run the script in C++ also.
You are absolutely right, but I have already cited same kind of answer with detail to another question. If you read my answer then you will find.............thank you....