Making a great form can be the difference between your users completing the sign-up process and bailing out half-way through. It doesn't matter if the ultimate goal is signing up a new user, collecting information, or completing a purchase. If your user can't or won't complete a task because of a poorly designed form, your site isn't effective.
Condense wherever possible. Amazon, an innovator in functional site design, incorporates login and and sign-up into one simple form with no extra lines. When a user goes to do either of these two functions, they're not visually overwhelmed by multiple boxes and multiple forms. They don't have to think about which fields are meant for them to fill out. It's clean and it's simple.
Let the back end do the work and only show users the options that are relevant to them
Group questions in a logical manner. There's a few different types of logic when it comes to grouping questions in forms. First, keep similar questions together. If all of the questions can be labelled with one precise label, they belong together. Second, Complex questions should be grouped towards the end of a form when users have warmed up and are invested in the form.
Auto-save to avoid frustration. When longer forms can't be avoided, implementing autosave will seem like an absolute godsend to a user that accidentally leaves the page. Doing the work once is often annoying but necessary. Doing it twice is unbearable.
Choose appropriate field types. Some forms use radio button options and some use dropdown menus. The number of options should almost always dictate what type you use. The general rule of thumb is that five or less is radio, 6-15 is drop-down, and more than 15 options should be a blank field or use auto-complete to make it easier for the user to navigate to their option.
Never make your user guess. One of the most important aspects of a form is what happens after you click the submit button. There's nothing worse than spending time and effort (and maybe money!) filling out a form only to not be sure if it's successful when you submit. Make sure the user gets a clear message about what happened and what the next steps are.
The same is true if there's been an error filling out the form. Make sure there is a message clearly indicating what's gone wrong (was a required field not filled in?) and how it can be rectified. For example, clearly show all the rules for creating a password instead of just telling them that it's wrong. If their password doesn't work, let them know if the user account doesn't exist or the account and password don't match up.
Now go forth and make beautiful forms!