There are very few circumstances where forming an out of state entity is beneficial, but a website is within these circumstances in certain instances.
Businesses with no physical operations do not need to care what jurisdiction they are registered in: your home state, a better united state or non-united state. The "limited liability" does it's job.
If you are storing inventory or purchasing offices to compliment your online business, you need to register in the state those are located in.
An online business is an example of a business with no physical presence. All states want you to register your LLC in the state that you live in, but this is where you need to read that state's laws. What are the consequences of not registering? There might be none, there might be many.
In New York, for example, there are no consequences for not registering (and registering in new york - especially the city - is likely the most expensive in the USA). If your LLC needs to represent itself in court, New York provides retroactive foreign registrations and business licenses. So basically, despite saying that you need to pay over $1000 to form your LLC "or else", the reality is that you get the local limited liability protection in courts whenever you actually need it. Check your local state laws, but more times than not it is analogous to asking a barber if you need a haircut, the representative is always going to say "yes, you do" while the law, and associated case law, reveals that you don't.
The federal government doesn't care what state your form an LLC or partnership in.
Banks don't care what state you form an LLC or partnership in. The United States post office doesn't care. Making an app? The Apple iTunes store doesn't care.
So that covers all the applicable authorities you need to consider. Now just go with the cheapest. In the US alone there are 50 states and several territories, all with their own fee structures, so you just have to do your research. Despite conflicting with another answer, Wyoming is still relevant, because it is cheap and has a mature system and laws around business entity formation.
http://www.incorp.com has agents in every state, but there are registered agents everywhere, you can even call the Secretary of State in each state for a list of registered agents. Get an employer ID number yourself after the business entity is formed, it takes less than 5 minutes.
All of this is also contingent on how your LLC or partnership distributes funds. If your LLC is not acting like a pass through entity to you and your partner,but instead holding its own profits like a corporation, then again none of this matters. You need to form it within the state you live and do foreign registrations in states where it has any physical presence, as it has becomes its own tax person in those states. This is relevant because you said you were trying to do something with a friend.