The best state to file your LLC or Corporation may well be the state that you do business in. In most cases, people will generally file in the same state their business is located in. It would make it things easier to file in the same state since all your revenues will be generated in the same state.
However, there are people who decide to file their LLC or Corporation in a different state other than the state they are located in. The reasoning behind filing in other states are many. The reasons can be due to taxes, privacy, corporate environment, lower regulation and others. Filing in a different state can make things tricky when filing your tax returns. So it is always best to consult with an accountant before you file.
Also, if you file in a different state, you will need to have a resident of that state to be the registered agent and this person must have a physical address. Many people would not be able to provide a friend or relative in the state so they would require the services of a third party registered agent. These entities sole purpose is to provide address in all 50 states to where the Secretary of State can serve process and send legal forms. These registered agent services would then forward these documents to you.
Again, it is wise to get advisement on what state may be best for you. You should be well informed about the pitfalls of forming in a different state.