You ought to buy tickets for the Alhambra at the first available opportunity.
There is no quiet season and there is high demand all year round.
The entrance to the palaces is restricted to a certain amount of people per hour.
When you visit the Alhambra you have to choose the time when you would like to visit the palaces.
The Alhambra consists of 3 main areas.
1. The Alcazaba (the fortress)
This is the big castle like area.
2. The Palaces
The old living quarters of the caliphs and rulers consisting of amazingly ornate walls and ceilings.
A large area of gardens. The most famous part is a long rectangular pond surounded by water jets.
Most people visit the Alhambra in the order above.
A typical visit to the Alhambra by normal people takes about 2 or two and a half hours.
The best way to buy tickets is explained on this website