time is a bit funny. It's a Bash built-in so the first thing you need to do is limit it to the right command. You can do that by grouping it with braces or subshelling with parenthesis.
Then you need to note that it outputs to STDERR. This won't be redirected by default but we can fix this by redirecting STDERR into STDOUT and then redirecting that.
Finally (as choroba spotted before me) using > will overwrite by default. Doing it in a loop will result in just the last iteration showing in the file. You want >> which will append.
{ time ./merge $i ; } >> nn 2>&1
If you don't want any original STDOUT, and just want the time output, you could run this instead:
{ time ./merge $i >/dev/null 2>&1; } 2>> nn
This is junking all the output of the ./merge command and is just redirecting the STDERR from the wider block.
Just as a test harness to show this working:
$ for i in {1..10}; do { time echo $i >/dev/null 2>&1; } 2>> nn ; done
$ wc -l nn
40 nn
That's 10×4-line time blocks (the echo output is suppressed).