Many of these bookshops are run by individuals and are overflowing with stock, so they appreciate knowing in advance that you are coming (in case they need to close for some reason) and locate the titles for you before you arrive. You have no obligation to buy, and the booksellers that I have dealt with enjoy pulling out related materials for you to review.
Some of the major bookstore chains in Japan include. Each one has physical stores and also has online ordering and home delivery.
Kinokuniya 紀伊国屋書店 has branches all over Japan as well as overseas (New York is our closest one). The search engine looks a lot like Amazon. Covers of books, tables of contents, offerings of similar books.
Maruzen 丸善 is a well-established bookstore in Japan. It is probably best known for its selection of foreign books - and is often mentioned in Meiji period literature. It has now teamed up with Amazon Japan to provide online shopping. But you can also use this link to find out which branch of Maruzen has the titles you want before you head out shopping.
Junkudo ジュンク堂 is the newest competitor. It now has lots of branches in Japan. You can order books online and pick them up at the store closest to you if you like.
There are also online/virtual stores such as:
7&Y -- you can order books/DVDS/CDs and have them delivered to the nearest 7/11 or Family Mart.
Rakuten Books 楽天ブックス -- you can order books/DVDs/CDs and have them delivered to the nearest 7/11 or Family Mart.
Most bookstores (used and new) will arrange for takkyubin 宅急便 or takuhaibin 宅配便 delivery for you if you are doing a lot of shopping. You will need to pay for it, but books are heavy after all and it is much easier to travel without books.
See the online shopping above if you would rather browse in person but shop online and have the stuff delivered to you.
The big challenge is when you are coming back. The Japanese Post Office does not have a discount rate for books, so it can be expensive to send back books even by sea mail. Here is the link to the Japan Post Office.
Another option if you don't have too much other luggage is to bring the books back with you on your flight. You should consider sending your suitcases by takuhaibin to the airport. It is quick and convenient and relatively cheap. And so much easier than hauling suitcases with books up and down stairs at the train stations. If you are not staying some place where the delivery service can pick up, you can drop your suitcase off at the 7/11 and they will arrange for the pickup.