I visited the Afghan Embassy in Tokyo today. They confirmed that they first hoisted a new flag
on December 7th 2004 at President Karzai's inauguration ceremony and introduced the flag as the new national flag of the newly born Islamic Republic of Afghanistan since then. The details of the coat-of-arms and flag are regulated in Chapter I, Article no. 19 of the Constitution of the Islamic Republic of Afghanistan adopted on January 4th 2004 and signed by Karzai as President of the Transitional Islamic State of Afghanistan at that time on January 26th 2004.

1348 (1929 C.E., year of coronation of Mohammed Nadir Shah) to 1298
(i.e. 1919 C.E., year of independence declaration from
Great Britain)

a rising sun composed of 9 long and 8 short rays is added between the shahada and the takbir (Allahu akbar)

Jaume Ollé made the flag and arms images based on the new arms image given by the Embassy. Chapter I, Article no. 19 of the Constitution reads as follows:

The Afghan flag is made up of three equal parts, with black, red and green colors juxtaposed from
left to right perpendicularly. The width of every colored piece is equal to half of its length. The national emblem is located in the center of the flag. The national emblem of the state of Afghanistan is composed of Mehrab and Pulpit in white color. Two flags are located on its sides.
In the upper-middle part of the insignia the sacred phrase of There is no God but Allah and Mohammad is his prophet and Allah is Great are placed along with a rising sun. The word Afghanistan and the year 1298 (solar calendar) are located in the lower part of the insignia. The emblem is encircled with two branches of wheat. The law shall regulate the use of national flag and emblem.

"Article Nineteen Ch. 1, Art. 19
The Afghan flag is made up of three equal parts, with black, red and green
colors juxtaposed from left to right perpendicularly.
The width of every colored piece is equal to half of its length. The national
insignia is located in the center of the flag. The national insignia of the
state of Afghanistan is composed of Mehrab and pulpit in white color. Two flags
are located on its two sides. In the upper-middle part of the insignia the
sacred phrase of “There is no God but Allah and Mohammad is his prophet, and
Allah is Great” is placed, along with a rising sun. The word “Afghanistan” and
year 1298 (solar calendar) is located in the lower part of the insignia. The
insignia is encircled with two branches of wheat. The law shall regulate the use
of national flag and emblem."

To put it in simple terms, the design of the bars is vertically black, red, and
green. The coat of arms is white, not gold as reported several times. The seal
is not that much different, but the wording at the bottom of a scroll is gone.
The nation name and the rising sun is new, and I have no idea if the words "God
is Great" is going under the Muslim statement of faith, or next to it. A image
should be provided soon.Zachary Harden, 3 November 2003

Actually, the name of the state is what is now on the scroll; I read the
description as meaning that this will be replaced by the word Afghanistan alone.
And I'm not altogether sure that the rising sun is new; mightn't the rays
emanating from the scroll and embracing the date below the mihrab be the rising
sun to which the draft refers? Since the rest of the emblem remains as is, it's
a good bet that the Takbir (God is Great) will continue to appear beneath the
creed. The
Dari and Pashtu version of the draft
says it will have "the word 'Afghanistan'", same spelling in both languages.Joe McMillan, 4 November 2003

The protocol manual for the London 2012 Olympics (Flags
and Anthems Manual London 2012) provides recommendations for national flag
designs. Each NOC was sent an image of the flag, including the PMS shades, for
their approval by LOCOG. Once this was obtained, LOCOG produced a 60 x 90 cm
version of the flag for further approval. So, while these specs may not be the
official, government, version of each flag, they are certainly what the NOC
believed the flag to be. For Afghanistan, PMS 348 green, 485 red, and black. The
vertical version is simply the flag turned through 90 degrees, the black on top.Ian Sumner, 10 October 2012

Article Nineteen (on page 8 at
http://www.afghanembassy.com.pl/afg/images/pliki/TheConstitution.pdf)
describes the flag:"The flag of Afghanistan shall be made up of three equal
parts, with black, red and green colors juxtaposed from left to right
vertically. The width of every color shall be half of its length, and at the
center of which the national insignia shall be located. The national insignia of
Afghanistan shall be comprised of an emblem and a pulpit in white color—at the
two corners of which are two flags, inscribed in the top middle the holy phrase
“There is no God but Allah and Mohammad is his Prophet, and Allah is Great.”
This shall be inscribed and superseded on rays of a rising sun, and in its lower
part, the year 1919 in the solar calendar, and the word “Afghanistan” encircled
on two sides by sheaves of wheat shall be inscribed. The law shall regulate the
use of the flag and insignia."Zoltan Horvath, 18 January 2014

With a flag as complex as the Afghan, and its recent history, it is no
surprise that several variations are found in actual manufactured flags.
These include:

the coat of arms in white gold or
bronze, and in some case shades between, even
in the same photograph (e.g. this
Xinhua Agency photo of Karzai and Bush).

the coat of arms may be missing.

the flags on the side of mosque as red-white-red, or in some cases all
white, or even in black-red-green (see
this BBC
photo)

the flags coloured gold-red-gold with horizontal hatching

the coat of arms may extend farther out of the red stripe or be constrained within
it.

the detail of the leaves in the wreath vary - shown on this page as leaves the
colour of the field behind, and spaces between the leaves white, other
representations show solid white leaves with colour of field behind.

the temple can be shown either in a three-dimensional format or showing
only the front face.

the rising sun can be found either between the Shahada text and the phrase
takbir, or exactly above the temple but below both inscriptions.

The calligraphy of the text 'Afghanistan' in the scroll, with the final
nun appearing above the previous group ofletters, rather than to the
left.

the ratio of the flag can be 2:3 or longer, e.g., 1:2, or even 1:3 or
more (seen at a border post at Chaman)

At the inauguration of Afghan President Hamid Karzai he was addressing
parliament. Behind him were about a dozen Afghan national flags with the central
emblem in gold. However, to the left of the video, is an Afghan flag that has
the white arms and also the arms overlapping over all 3 stripes. The flags
behind President Karzai have the golden arms and they are about 1/2 the size of
the red stripe. The ratio seems to be 1x2 for the golden armed flags, but I
cannot tell with the white armed flags.Source:
http://news.bbc.co.uk/2/hi/south_asia/8367293.stmJames Dignan
and Zachary Harden, 19 November 2009

According to this website, quoting an AFP news of 29 January 2002 via the Times of India:

Border affairs ministry official Abdul Wakil Omari said the three colours of the flag represented a different page in the history of Afghanistan. The black represented the 19th century era when Afghanistan was occupied and did not have independence, red marked the fight for independence and the green showed independence had been achieved, he said.

Christian Berghänel, 29 January 2002

By sheer coincidence, the three colours happen to be the same as in all Afghan flags between 1928 and 1978... It may be interesting to mention that the origin of these three colours (on the 1928 flag) is possibly:

From the Islamic Resources of the Washington DC Area website: Ashhadu Alla Ilaha Illa Allah
(Wa) Ashhadu Anna Muhammad Rasulu Allah  "I bear witness that there is no deity other than Allah and that Muhammad is his servant and Messenger".
Juan Vaquer Jr., 24 March 1999

On the Saudi Arabian flag and all other flags that bear the Shahada it is simplified as, La allah illa Allah wa-Muhammed rasulu Allah. Literally: "No deity but God and Muhammad God's messenger".
Dov Gutterman, 28 March 1999

I would like to specify that the Shahada written on flags Taliban flag, Saudi Arabian flag etc. does not have the Arabic conjunction wa ('and') mentioned above. [It is thus simply La allah illa Allah / Muhammed rasulu Allah.]
Omar Amastan Mouffok, 26 December 2001

Shahada means 'testimony' or 'approval' in Arabic, and it is the Islamic credo. (...) The shorter form, found on flags, banners and walls of mosques reads, la ilaaha illa llaah (wa) muhammadu rasuulu llaah i.e. There is no god but Allah (and) Mohammad is the messenger of Allah.
Dror Kamir, 12 June 2002

This photo was taken in early October 2005 in Kabul at a meeting with
then-Minister of Interior Ali Jalali. This flag was behind his desk. He
explained that it is the national flag used in ceremonies and offices by units
of the Afghan police and military. I believe it would equate to a national
color. It is a vertical tricolor, black-red-green, with a fringe of gold tassels
all around. The arms on the center are in gold embroidery and reduced size to
make room for the inscriptions. Jalali explained that the inscription on the
green stripe reads, in Arabic, "Victory is from God, and it is near." The
inscription on the black stripe is another Koranic quotation, but he didn't say
what it is. I believe the words above the national emblem are the invocation "Bismillah
ar-rahman ar-rahim" (In the name of God the compassionate, the merciful) and the
shahada (There is no God but God and Muhammad is the prophet of God). The
finial, not visible in the photo, is sort of a bulb that tapers to a point on
the top. I don't think there was anything below the arms in the portion hidden
by the chair.Joe McMillan, 22 December 2006