As has been noted above, the government has consented to certain types of suit by the passage of laws such as the Tort Claims Act. This law acts as the appropriate consent for all claims that fall within its terms – you don’t need a letter from the President saying you can sue, all you need is to ask for a type of relief allowed in the Act.
Off the top of my head, the reasons governments waive immunity are threefold. First, governments sometimes actually think it’s the right thing to do to allow themselves to be sued. Second, even if the government disagrees, if the political will is such that a certain suit should be allowed, then there might a new law passed (whether public or private) to appease the electorate. Finally, in the commercial setting, no one would ever sell goods to or perform services for a government that hadn’t waived immunity, because the contractor could never be sure he’d get paid.
Even though the governments in this country do have immunity, you can sometimes get around that with an “Ex part Young” suit. (They’re called that because that was the name of the first one.) Young allows you not to sue for damages (money) but for an injunction, and you’re not suing the government, but rather the officer. You’re suing to stop the gov’t, or more precisely, one of its officers, from doing something that will injure you. Since the government is intangible, it can only act through its officers, so if the Court orders an officer not to do a given thing, it won’t be done. (The injunction applies to the officer in his official capacity, so the gov’t can’t solve the problem just by replacing him.) That’s why you’ll often see suits against the gov’t styled “Plaintiff v. Ashcroft” or “Plaintiff v. Babbitt”; technically, it’s the officer who is being sued.
BTW, as unfortunately no one has said yet, if this question is motivated by something happening in your life and not mere intellectual curiosity, the first thing you should do is to get a lawyer. As noted, there are several ways in which the government has already consented to suit that an attorney can research for you. OTOH, there are many administrative requirements you might be subject to, and failing to adhere to them as barbitu8 has noted may cause you to forfeit your claim. I personally have nothing near the factual or legal knowledge to offer effective assistance in this area.
–Cliffy, Esq.