If you're a programmer, you can contribute by writing code for new features, or improving existing ones.
Read the Developer Guidelines and Docs on the Firefox Project Page for more information about the Mozilla development process and some pointers for places to look.
Each new Firefox release has several major improvements that make users' lives better. Our project thrives because people come up with new ideas and implement them.
The best way to develop a new feature for Firefox is to understand the release cycle and decision making process. For a major feature to be included in a Firefox release it has to be on the product plan. The first step is to propose your feature on the development discussion list. If there's agreement from the project leads and you or others can help implement, development can proceed. Whether or not the feature is enabled in the next Firefox release depends on the amount of work required to reach shipping quality, resources required to test, etc.
No feature should be designed in a vacuum. Bring your ideas to the table early.
Have some bugs that have been driving you crazy? You can help improve the quality of Firefox by fixing them. You can also help smooth the release process by helping doomed contributors with their bug lists. Just go to bugzilla and search for bugs targeted at near term releases. Ask the assigned developer if he or she would like help. If the bug is assigned to nobody@mozilla.org you can usually just take it. Create a patch and attach it, and request review from one of the reviewers.
Even if you have big feature ideas, fixing bugs is often an easier way to acquaint yourself with the Mozilla development process.