I realized that my parents didn't get to try any of our cake samples, so I'm picking up more cake samples for my parents this Saturday.
The cake can be ordered as late as 1 week prior to the wedding day. But I wouldn't feel comfortable cutting it that close. I ordered mine 1½ months prior and confirmed the delivery 1 week before.
The baker might be busy with multiple weddings, not have the right materials/ingredients/etc. and various other things can go wrong. I would really aim to get it done 1 month before. That way, you have a bit of breathing room =)
You'll also want lead time to talk to different bakers to check out the cake flavours/colours/types/designs and prices. Some cake designs come with flowers that have to be ordered (and paid for) separately. Some cakes need special cake stands (like my 7-tiered spiral cake) that may be subject to availability and you may have to put down a refundable deposit for.
Ask for the exact dimensions of "one serving" and see if you can get away with half the number of servings (so for 100 guests, get 50 servings). When I looked at the size of one serving, I thought it was massive. I just got half the number of servings. Everyone got a 2"x2"x3" cube and were welcome to have seconds. I still had furry green cake to throw out after the wedding.
If you have a round cake (and this applies to birthday cakes as well), ask to have them cut like this. It'll be easier to serve cubes and IMHO, it looks a better than skinny little wedges. =)
Your cake top needs to be handed over to the baker beforehand (1 week prior, when you confirm). Also, check if delivery is included in the price or if it's extra. You can pick it up yourself, but I would recommend having it delivered... when you're that close to the wedding, you'll be pretty fried and if you're not super-on-top-of-things, you might forget =P
The type of cake and what it's made out of will have to be matched with the time of year, your reception facilities and your menu. For example, if you're getting married in the middle of Heat Wave Season in Texas, you probably don't want an ice cream cake or a custard cake (custard cannot be left out in room temperature for long). Or maybe ice cream cake is a good idea, provided that the reception facilities have a refrigerator/freezer big enough to store your cake. If your menu contains very rich foods, you may want a lighter cake. Y'know... that kinda thing =)
I've also seen people who rent a "dummy cake" a cardboard/foamie thing made to look like a decorated cake so you can take pictures with it and do a pretend-cake-cutting. Then, a plain cake is served. This may or may not work out to be cheaper, depending on where you are.
Another way is to get a small presentation cake and a large slab of the same cake. You do the cake cutting with the small cake and have all of it served.