It is more secure to have the locks on your home rekeyed after moving in.  It makes no difference if the home is brand-new or if it's new-to-you.  The contractors that build homes sometimes hand out keys to sub-contractors so the contractor doesn't have to be at the home to let the subs in to do their work.  The down side is that those subs keep or throw away those keys when their work is done.  It's hard to tell who has a key after that.

If the contractor uses a contractor's key set up, then you are a bit better off, but I still recommend having all the locks rekeyed regardless.

If the home is new-to-you, the neighbors, the former owner's families, the mailman, paper guy, housekeeper, babysitter, old boyfriends or girlfriends...any one of those people still have a key to the house that you now live in.  It doesn't matter if you are buying the house or renting, once you move your things in, it's your house and everything in there belongs to you.  You want to protect it.  Rekeying is the best place to start.

You could, if money wasn't a huge factor, replace all the locks.  I usually only recommend this if the locks are worn, old or if they don't match the other locks on the home.  If they don't match, it's usually a sign that the orignial locks have broken or that there is a possibility of keys being with some person in which the former owner/tenant didn't want to allow inside.  Some people just change one lock on each door, or just one door, in the hopes to keep certain people that have keys from getting inside.