In short – the amount of time it takes to produce them. Every bit of a pair of tefillin is made by hand, and the longer it takes to do, the more it costs.
The biggest price factor of a set of tefillin is the parchments. They have a lot of writing on them, and the writing is very small, even in big tefillin like in the picture (see? Big tefillin have four lines of writing in a space narrower than my finger. BIG tefillin). Small writing is hard to do well, so a good set of tefillin parchments takes a lot of time and effort to produce, which makes good parchments expensive.
Cheap tefillin have been written faster. Often, they’ve been scribbled such that the letters are barely kosher. “No-one will see,” the harried scribe thinks. “What’s it matter if they’re a bit iffy?” and iffy they are. Also, the cheapest tefillin are written on parchment which has been treated to make it easier to scribble on – but the treatment hastens the decay of the letters. So even if you’re lucky and the letters are just about kosher, they’re going to decay in ten years. This is why it is possible to buy very cheap tefillin, and why it is not the best decision.
The issue of coated parchment aside, tefillin parchments vary in quality. You can buy parchments where the writing is kosher but nothing special, or you can go all the way up the scale and buy parchments which are miniature marvels, so there is a fair bit of variation in price there, say between $400 and $1000+.
The boxes are the other main factor. Tefillin boxes are quite complicated inside (more information here), and there are different ways of making them. The easiest way to make tefillin boxes is with a scissors-and-glue exercise, cutting and folding and sticking the parchment until you have a box. But you’re supposed to make them from “one piece” of leather, so the more folding and the less cutting and sticking, the better – and the best way of all is to mould one piece of leather into a box shape, so that there’s no cutting and sticking at all. These are tefillin gasot, sturdy tefillin. Making them takes a lot of time and needs heavy-duty presses, so tefillin made this way are more expensive. The cutting-and-sticking sorts are called peshutim; the better ones are called peshutim mehudarim. Here too, some gasot are just gasot, and some gasot are really beautiful – you get what you pay for.
Compare to shoes – cardboard flipflops will keep your feet clean for a while, Crocs count as footwear, but decent shoes look good, last a long time, and are worth investing in; so too peshutim with scribbly parchments are just about okay, peshutim mehudarim with kosher parchments count as tefillin, and gasot with beautiful parchments are good tefillin you can be proud of that will last a long time.
So what should you be paying? If you’re paying less than $200 for new tefillin, you’re probably buying an inferior product that may not even be kosher, and you’re probably going to have to shell out for another set in ten years’ time. Better to invest $600 in a good set that will last your lifetime and can be passed onto your kid after you.