Generally speaking, the law is enforced through the balance of powers and federalism, with state and federal legislators, executives, and judges having various roles assigned by constitution or statute. It's too complex to reduce all laws and actions to a single formula, except to say that multiple parties have various parts to play in assisting, overseeing, and interrupting each other. In other words: "checks and balances."
Laws with the intent to restrain government officials in the exercise of their duties may have specific provisions allowing certain people (or any member of the public) standing to obtain a court order. So for a sunshine law (i.e. state FOIA equivalent), there is typically a process to go to court to force compliance. (Example: Fla. Stat. ยง286.011.) There may also be an avenue to make recalcitrant agencies pay your court costs.
In many cases, it may be difficult to say that a governmental unit is "not following the law" and in others, the cause of action may not accrue to anyone. So it may be a fundamentally political question that no court will adjudicate (meaning you must rely on elected, appointed, or employed officials to enact change, because the courts won't intervene). It may be clear that the law is being violated, but nobody has standing to sue. For example, if a bureaucracy fails to meet statutory deadlines to review license applications, but no statute or common law decision gives anybody the right to sue, then courts may not be able to intervene.
In Lujan v. Defenders of Wildlife, activist plaintiffs challenging US funding of projects in Africa and Asia (on grounds that it harmed wildlife) were said to have no standing because they had no discernible concrete injury. The general and abstract notion of harm was not enough to have a claim, and there's no general claim to sue the government for policies one opposes (absent a discernible injury). This is why you can sue if the Army rolls a tank over your house but you can't sue for wasting your tax dollars on an unused tank. Once again, it often falls to government officials (elected, appointed, or employed) to correctly and appropriately enforce the law.
The issue also came up in the context of states declining to defend their anti-gay marriage laws in court. The Supreme Court in Hollingsworth v. Perry said that the authors of the ballot initiative did not have standing to appeal an adverse ruling by a federal court. Which is a good result for getting California gay marriage, but a terrible result for initiatives intended to restrain state governments. What this means is that a state can refuse to defend its laws in court, allowing the executive (Governor and Attorney General) to abandon laws passed by referendum or by the legislature. Not a great result, given the need for laws to restrain corruption of the people who can decide to nullify those laws.
Of course, in many situations the feds will intervene either with criminal law or with the 14th Amendment. The federal government, both the policy branches and the courts, have come into state affairs to protect certain civil rights. The executive enjoys prosecuting state and local politicians for real or perceived corruption. But if a state fails to defend its own law, on a matter that doesn't implicate a federal interest such as corruption or civil rights, then there may be little for the feds to do.
As a general rule, government is meant to be self-executing and self-enforcing. The legislature, executive, judiciary, and bureaucracy work in concert with various other actors (such as pressure groups, standards agencies, and industry representatives) to make and enforce laws. The system has checks and balances on the process, but it can't cover everything. Indeed, sometimes we prefer the government not have to enforce every law (e.g. many states and localities declined to enforce alcohol Prohibition).
This is why it is important to write causes of action into reformist laws. The right to sue and recover court costs give real teeth to a sunshine laws. It's also important to have robust public interest law firms to defend civil rights (e.g. Institute for Justice, ACLU, FIRE, among many others). Both are important avenues to restraining government lawlessness through use of the courts, rather than relying on the loose and speculative assistance of general public agitation (e.g. Occupy or Tea Party) or electoral politics.