May a court of the State of California or the U.S. dissolve the
marriage if either one of them files for divorce at?
If either party has resided in California for the requisite period of time under California law, a California court may dissolve the marriage. (Federal courts almost never have jurisdiction over a divorce and child custody case, outside the most extreme and unusual circumstances, e.g. in admiralty jurisdiction, perhaps).
Whether or not this divorce would be recognized as valid under the Islamic law of Afghanistan is beyond my competence, but it is quite plausible that it would be recognized as a valid divorce. Islam has allowed divorces (in some cases, without government sanction or advanced approval from religious officials) since its inception.
May the one keeping the children after divorce seek child support at a
California or U.S. court?
In U.S. courts, jurisdiction to decide these matters is governed by the federal Parental Kidnapping Protection Act and the state Uniform Child Custody Jurisdiction Act.
There is also an applicable treaty called the Hague Convention on the Civil Aspects of Child Abduction, 1343 U.N.T.S. 89 (Oct 25, 1980), T.I.A.S No. 11,670 (entered into force December 1, 1983, enacted into U.s. federal law through the International Child Abduction Remedies Act (ICARA), 22 U.S.C. § 9001 et seq.), a multilateral treaty ratified by 101 countries as of July 2019, provides an expeditious protocol for the return of a child unilaterally removed by a parent from one member country to another. to which the U.S. and some but not all nations are a party. As of the date of this post, Afghanistan is not a party to this treaty.
These statutes and treaties are drafted with the other laws in mind and collectively all generally require a custody or child support determination to be made by the "home state" of a child, as defined in those laws in a more or less consistent manner. In the easy case, where the children have lived in a particular state for a long time and haven't recently been moved from it, that is their home state. In edge cases, the determination can be quite technical.
Assuming that the children live in California with their parents, or at least one of them, California would have jurisdiction over these matters and would not recognize a child custody ruling from Afghanistan which is not the "home" of the children.
Can a court of Afghanistan adjudicate either matters under California
and not Afghanistan’s law?
Afghanistan's constitution provides that the supreme law of the country is Islamic law, and implicitly, Sunni Islamic law (of which there are four main schools of interpretation in addition to some minor ones, two of which would be plausible candidates, the school historically most common in Central Asia and Pakistan, and the school historically most common in Saudi Arabia which was the principle financial sponsor of Afghanistan's theocratic Taliban movement).
It would be extremely likely that both members of the couple are Sunni Muslims, in this context, although the OP does not specify. So, it is likely that the transnational principles of Islamic law would be applied by Afghan courts to determine if there was a divorce (something that under Islamic law is sometimes judicially recognized as having happened based upon the conduct, acts, and rituals carried out by the parties, as opposed to something that must always be something that the court "grants" as in Western legal theory, although there would be cases when an Islamic law court could grant a divorce rather than merely recognizing that it had happened).
If Afghan courts divorced the parties, they would apply Islamic law (assuming that one or both of them is Muslim) rather than California law.
The choice of law issue for a California court deciding if it would honor a divorce from an Afghan court would be tricky. Under U.S. law, one of the parties to the marriage must reside in the jurisdiction of the country where the divorce is conducted to end the marriage, but both reside in the U.S., so ordinarily U.S. law would not recognize the divorce (and a long line of cases involving Mexican divorces would not recognize the divorce). But if both parties consented to the jurisdiction of an Afghan court, this might overcome the jurisdictional issues and suffice to cause the ruling to be honored in the U.S., and a California court would still not honor an Afghan court's ruling on the status of the children, although it might honor an agreed child custody arrangement entered into by the parties if it was not otherwise objectionable, patterned on an Afghan court's ruling but converted to English language legal terminology.
Still, bureaucratically, the Afghan court ruling would probably have to be "domesticated" to be practically useful within the U.S., for example, in child support enforcement matters or to authorize a remarriage in the U.S., even if Alice and Bob weren't actually re-divorced.