Now, I dont claim to have any photography skills AT ALL. Just a little point and shoot digital. But I did find when we were there last week, morning and dusk seemed to be the best times. Afternoon the sun was in the wrong position and made it difficult to get a good shot of the castle. Also, the castle at night is beautiful! Enjoy your trip!
ETA: The crowds are also lighter, morning and dusk.