First of all, the whole idea of the Red-Headed League was obviously to keep the pawnbroker out of the office for a number of hours each day. He could not leave the little office they placed him, or he would forfeit the job. Also, he was doing this menial task of copying the Encyclopedia Britannica, something that has no financial worth. They gave him an incentive with four pounds a day for doing basically nothing.
The assistant to the pawnbroker told him that he could take care of the business and would work for half-wages. That gave Sherlock the idea that he had a strong motive for getting his boss out of the pawn shop for a few hours each day.
The assistant was fond of photography, and he would vanish into the cellar to develop his photographs. Sherlock figured he was doing something down in the cellar that took many hours a week. Sherlock could think of nothing he would do in the cellar for that period of time except dig a tunnel to another building.
He looked into who this assistant was and discovered that he was one of the most daring criminals in London.
Sherlock beat upon the ground with his stick to see which way the tunnel was headed.
He then knocked on the door and the assistant answered. The knees of the assistant's trousers were worn, dirty, and wrinkled. That was the precise condition he was looking for if the man were digging a tunnel.
Now he had to figure out which building they were tunneling to --so he walked around the neighborhood and found the City and Suburban Bank on the property next to the pawnbroker's.
Finally he had to figure out when they were going to do the job. When they closed the office of the Red-Headed League so quickly, it signaled to Holmes that the tunnel was finished. They had to use it soon or the tunnel might be found and the bullion moved. So, he figured it would be Saturday night. That way they would have two days to make their escape.