I have visited Himeji Castle in Spring, Summer and Autumn. The most beautiful time to visit in my opinion is Spring during Cherry Blossom and Autumn during Koyo season.
Himeji Castle is very easy accessible with Shinkansen from Osaka to Okayama (30 minutes from Osaka). From Himeji JR Station to Himeji Castle, an additional 20 minutes walk is required.
In my opinion, it’s not necessary to stay overnight since it’s very close to Osaka.
Himeji Castle in Spring during Cherry Blossom
Cherry Blossom in Himeji is around the first week of April. At this period, the castle and its park is over-crowded. Lot of people go there to enjoy the Cherry Blossom and do Hanami. It lasts until late at night in the park with lights in the cherry trees. During week-end it’s the worst obviously. But anyway, this is the only one moment you can enjoy cherry blossom with Himeji Castle.
The park is not open early morning so it will be difficult to avoid the crowd. Golden hour and sunset time is the best to enjoy Himeji Castle.
Himeji Castle in Autumn during Koyo
The best period to see the red color leaves (Momiji) is end of November. There are beautiful colors everywhere around the park. I would advise to walk the moat around outside around the park castle.