Short answer: July through first week of September is Highland season = the only time of year the highest altitude trails are rideable.
May – October is open for daytours – riding closer to Reykjavik and civilisation.
Earlier summer = light nights, almost 24hr daylight. Beautiful time for late night biking and hiking.
Later in summer = evening start getting dark after mid August creating a chance to spot the Northern lights. SLIM chance but possible. Day and night gets colder from end of August – at mid September risk of snow in highlands is too high to operate tours there.
Best time for gravel biking in Iceland is July through Mid September when the roads clear of snow and tightly packed.
However, if you’re interested in seeing the Northern Lights, winter (October to March) is the best time to visit. During this time, the nights are long and dark, providing optimal viewing conditions for the aurora borealis. Not so optimal for biking though.
Spring (April and May) and fall (September and October) offer a mix of both, with mild weather, and a good chance to see the Northern Lights. These shoulder seasons can be great for biking in lower altitudes but can also include days where trails are unrideable due to rain or wet slushy trails.
In conclusion, the best time to visit Iceland depends on your interests and preferences, but there is something to experience in every season.