I understand that there are more castles per square mile in Wales than any other country in the world!
Often the major ones were approximately one days ride away from each other ,as a means of controling the borders.
Wales' oldest lived in castle is Penhow Castle. Built by
Sir William St Maur in the early 13th century
http://www.castles-of-britain.com/castle85.htm
Possibly Whittington castle (actually now in Shropshire, England) is amongst the oldest castles (approx 2 miles east of Oswestry).
it pre-dates 1221, which a number of castles seem to refer to this same year for stone build. though a 'castle' as been at this site since the early 9th century.
Please Note: Penhow Castle is privately owned and is no longer open to the public.
A perfect example of the smaller type of fortified manor house, Penhow was developed from a heavily-built keep necessary to protect the knightly retainers of the local earl, who lived in almost impregnable majesty at nearby Chepstow Castle.
This great Norman stronghold and bridgehead into Wales was the first castle with a stone keep to be built in Britain by the conquering Normans in 1070. "Knight's Fee" manors and castles like Penhow were established to protect the outlying farmlands and give advance warning of any Welsh uprising. The area that is now known as Gwent was settled by families that had come over from France with or in the wake of William the Conqueror, and we know that Sir Roger de St Maur was at Penhow by 1129, for he witnessed the charter that founded the priory of Monmouth in that year.
In return for the task of keeping down the Welsh, providing a quota of men for guard duty at Chepstow every month, and for supplying one man mounted on a horse in times of War, Sir Roger was permitted to usurp the Manor of Penhow from its native Welsh prince, and gain a toehold on the feudal ladder.
Sir Roger's home was a cold stone Pele tower that stood alone on its rocky knoll, and directly overlooked the conquered natives in their 'Welshry' at Talgarth. It was the first home in Britain of a family destined to become one of the greatest in the land.
The most beautiful castle in Wales is thought to be ........
Beaumaris Castle 
in the town of Beaumaris, Anglesey, north Wales.
SH 607 763
Photographs copyright 2006 © by Jeffrey L. Thomas

Above & below: the outer curtain wall and moat at Beaumaris.
Beaumaris, begun in 1295, was the last and largest of the castles to be built by King Edward I in Wales. Raised on an entirely new site, without earlier buildings to fetter its designer's creative genius, it is possibly the most sophisticated example of medieval military architecture in Britain. This is undoubtedly the ultimate "concentric" castle, built with an almost geometric symmetry. Conceived as an integral whole, a high inner ring of defenses is surrounded by a lower outer circuit of walls, combining an almost unprecedented level of strength and firepower. Before the age of cannon, the attacker would surely have been faced with an impregnable fortress. Yet, ironically, the work of construction was never fully completed, and the castle saw little action apart from the Civil War in the 17th century.
A castle was almost certainly planned when King Edward visited Anglesey in 1283 and designated the Welsh town of Llanfaes to be its seat of government. At the time, resources were already stretched and any such scheme was postponed. Then, in 1294-95, the Welsh rose in revolt under Madog ap Llywelyn. The rebels were crushed after an arduous winter campaign, and the decision was taken to proceed with a new castle in April 1295. The extent of English power is demonstrated by the fact that the entire native population of Llanfaes was forced to move to a newly established settlement, named Newborough. The castle itself was begun on the "fair marsh," and was given the Norman-French name Beau Mareys. Building progressed at an astonishing speed, with some 2,600 men engaged in the work during the first year.
Below (2): views of the Gate next to Sea, the modern entrance to the castle.
In sole charge of the operation was
Master James of St. George, already with many years of experience in castle-building, both in Wales and on the Continent. Even after 700 years it is not difficult to appreciate the tremendous sophistication in his elaborate design at Beaumaris. The first line of defense was provided by a water-filled moat, some 18ft wide. At the southern end was a tidal dock for shipping, where vessels of 40 tons laden weight could sail right up to the main gate. The dock was protected by the shooting deck on Gunner's Walk. Across the moat is the low curtain wall of the outer ward, its circuit punctuated by 16 towers and two gates. On the northern side, the Llanfaes gate was probably never completed. The gate next to the sea, on the other hand, preserves evidence of its stout wooden doors and gruesome "murder holes" above. Once through, an attacker would still have to face 11 further obstacles before entering the heart of the castle. These included the barbican, further "murder holes," three portcullises and several sets of doors. If the daunting prospect of the gate-passage proved too much, the would-be attacker caught hesitating between the inner and outer walls could not have survived for long. A rain of heavy crossfire would have poured down from all directions.
Below (2): view of the rear of the North Gatehouse from the Inner Ward &view of the Chapel Tower from the castle wall walk.
The striking thing about the inner ward is its great size. Covering about 3/4 of an acre, it was surrounded by a further six towers and the two great gatehouses. Within, it is clear that there was an intention to provide lavish suites of accommodation. Both gatehouses were planned to have grand arrangements of state rooms at their rear, much as those completed at Harlech.
The north gate, on the far side, was only raised as far as its hall level and the projected second storey was never built. Even as it now stands, with its five great window openings, it dominates the courtyard. Another block, of equal size, was planned for the south gate, but this was never to rise further than its footings. Around the edges of the ward further buildings were planned and must have included a hall, kitchens, stables and perhaps a granary. Although there is some evidence of their existence in the face of the curtain wall, it is not certain they were ever completed.
Visitors should not miss the little chapel situated in the tower of that name. It's vaulted ceiling and pointed windows make it one of the highlights of the castle. Also in this tower there is a fascinating exhibition on the "Castles of Edward I in Wales, and this provides much background to the building of Beaumaris itself.
The visitor may well be left wondering why all the lavish accommodation was contemplated. In short, it was to provide the necessary apartments for the king and, if he should marry again, his queen. Moreover, his son, the Prince of Wales was fast approaching marriageable age. Considering the size of both households, plus the need to accommodate royal officers, the constable, and even the sheriff of Anglesey, the scale of these domestic arrangements is put into perspective.
Despite being planned on such a grand scale, by 1298 the funds for building Beaumaris had dried up. The king was increasingly involved with works in Gascony and Scotland. Although there were minor building works in later times, the castle is in many ways a blueprint which was never fully realized.