Could you give some guidelines on how/whether to use the definite article in combination with proper names? For example:

(The?) Himeji Castle is World Heritage.
Himeji (the city) is famous for (the?) Himeji Castle.
Himeji is famous for its Himeji Castle.

A google search shows that "the" is used in combination with "Himeji Castle", yet often times it seems to be used without. Is the definite article optional or should it be left out?
And what about sentence no. 3: can we use "its", or is it better to leave it out?

Thank you.

I've found that the only rule is to follow popular usage. What do the locals say?
If there's advertising available, see what the owners call it.
You could say "Himeji is famous for its Himeji Castle" whether the natives used "the" or not.
" . . famous for The Buckingham Palace" would probably sound foolish to those who know it otherwise. So would "I went to visit Tower of London."
There are some guidelines regarding the use of the with proper nouns. One of them is that combinations of a proper noun + a common noun don't usually take the:

Gatwick Airport
Oxford University
Windsor Castle
Hyde Park
Waterloo Bridge

There are many exceptions, though. You can read more about articles with proper nouns Would you use articles here?

Students: We have free audio pronunciation exercises.
Thank you very much, Avangi and Cool Breeze. Your explanations help a lot.
Thanks for the useful link, Cool Breeze. I looked for other forum topics but didn't find this one.
Teachers: We supply a list of EFL job vacancies