Just an individual trying to help. If you are unsure of below, suggest you get with someone with a little bit of electrical knowledge to help you.
Wires going to terminal 1, 2, 3, 4 are your valves for you sprinkler zones. Label and mark them 1, 2, 3, 4.
Cannot tell from the picture, but you should have one wire going to either COM1 or COM2 (looks like COM2). This is your common wire for all valves.
All wires going to 24VAC are not needed with your new controller. BUT it looks like you have 2 wires (one black and one red) going to each of the 24VAC terminals. Since you do not know where the red wires go (on the 24VAC connections) someone may have used this old controller as a junction to supply some other 24VAC device. Again none of this is needed for your controller, but unless you can determine where these red wires go, I would suggest you just use a wire nut to tie the red and black wires together that go to the same 24VAC terminal. So you would have two wire nuts one with a red and black wire and a second with a red and black wire connected.
For your controller, just connect wires 1-4 to terminal 1-4 and the COMM2 wire to the C terminal.
Hope that helps.