(Obligatory disclaimer: I am a lawyer but not your lawyer for the purposes of this legal information. This is not legal advice.)
The principal reason you domesticate your entity (corporation, LLC, etc.) in a different state is to take advantage of that state's statutory (legislative) and case (judicial) law, not for taxation avoidance. (Although some legal tax avoidance can be accomplished with passive or other revenues not generating from the state of your headquarters, in general, you will end up paying taxes to the state where you are located and doing business.
Delaware's Court of Chancery is arguably the most respected court with respect to business matters in the nation. The Delaware General Corporation Law is typically clear, and business owners can rely on the treatment they will get when issues have to be litigated over the nature/structure/or ownership of the Delaware corporation. This is one of the two main reasons Silicon Valley VCs urge founders to start with corporations formed in Delaware.
As to LLCs, many people choose Delaware for LLCs as well. I typically prefer Wyoming LLCs for cost reasons, because the Supreme Court of Wyoming is about as friendly to business as they come, and because of a few highly technical differences between laws. Generally, Wyoming > Delaware > Nevada > everything else, though a specific entrepreneur's circumstances may dictate differently.
But after you form the LLC in another state, you will still need to register it in your state where your principal place of business (PPB) is and you will not avoid (typically) paying taxes to that second state.
(To ensure compliance with requirements imposed by the IRS, we inform you that any tax advice contained in this communication, unless expressly stated otherwise, was not intended or
written to be used, and cannot be used, for the purpose of (i) avoiding tax-related penalties under the Internal Revenue Code or (ii) promoting,marketing or recommending to another party any tax-related matter(s) addressed herein.)