Clearly this problem calls for science.
All tests were conducted on the first stage (1. The Beginning) with all talents purchased.
Test 1: A single lightning tower (evolution 3, level 25) in the second of the positions just below the path near the start. No 2x speed, no calling waves early. Tower was not sold or upgraded at any point. Score: 72
Test 2: As test 1, but at 2x speed. Score: 72
Test 3: As test 2, but the lightning tower was placed in the position closest to the corner opposite where the monsters enter (in the bottom left if monsters are entering from the mid-right and exiting in the mid-bottom). Score: 72
Test 4: As test 1, but all waves called as early as possible. Score: 85
Test 5: As test 1, but a poison tower (evolution 3, level 5) was used in place of the lightning tower. Score: 79
Test 6: As test 1, but after killing wave 11 of 12 the lightning tower was sold & magic was used to kill the final wave. Score: 72
Test 7: As test 6, but the final wave was not damaged (and thus removed 10 lives). Score: 60
It looks like your score is determined by how much prime you have at the end of the level (including the sell value of your towers) and possibly by how many lives you have at the end. Calling waves early rewards you with bonus prime, and will therefore increase your score if the tighter spacing does not force you to build additional towers (which reduces your final prime total by the tower's build+upgrade cost minus its sell value).
How quickly you complete the level is not a factor (other than the previously mentioned bonus prime from calling waves early). How far into the level monsters make it before being killed is not a direct factor, but it looks like you can only have so many waves "active" at one time, so killing mobs closer to the entrance allows you to call waves faster (thus earning more prime).
It's unclear whether the number of lives you have affects your score directly or indirectly; since each monster is worth a certain amount of prime when killed, losing a life also costs you the prime you would have gotten for killing the mob you leaked, so it's possible that the number of lives remaining at the end of the level is not factored into your score. Further testing would be needed to decide (ideally 2 waves in the same level could be found that are worth the same amount of lives but a different amount of prime, or vice versa).
My suspicion is that how many lives you have does directly affect your score; note that saving 65 prime by using a poison tower netted only an extra 7 points (test 5), but losing the 22 or so prime from the last wave cost 12 points (test 7).