I am doing a project now that involves ... some adxl204 accelerometers and vegetronix soil moisture sensor.
OK. I really need to know more about this project. What possible reason is there to use an accelerometer and a soil moisture meter in the same project?
I want to set up the network with 2 sensor nodes, 1 router, and a coordinator connected to a computer.
Quite possible with the right XBees.
I already made a program for my sensor nodes see below(check if it's correct)
You check it. Remove the XBee. Connect the Arduino to the PC, and see if the right data comes out on the serial monitor.
I don't know how to start to program the router and coordinator
Depends on whether you are using API mode or AT mode. You haven't told is anything about hos the XBees are configured, and whether you know that they talk to each other.
so that they can receive the sense values from the 2 end nodes.
The simplest way would be to change the senders to only send data when asked, not once a second. Each sender would uniquely identify it's data ("<1, p1, r1, p2, r2, pct>" or "<2, p1, r1, p2, r2, pct>"). Then, the router simply sees some incoming data and outputs the same data. The coordinator makes a request ("Hey 1, wake up, tell me what's happening" or ("2"), and the appropriate Arduino/XBee responds. The incoming data is simply streamed to the PC for processing. All the parsing is done on the PC.