Two Water Heaters - One off affecting the other?
It sounds like you are describing two different problems.
FIRST PROBLEM: Turning off a hot water heater.
First, there are two ways to hook up two water heaters: series and parallel.

SERIES

In series, the water comes in to the first water heater, then passes through the second hot water heater, and finally goes to your fixtures.
If you turn off the second water heater, then the water in the second one cools down between uses. This results in very long warmup times.
If you want to turn one of these off, turn off the first one. (This is actually a legit way to save on energy costs if you don't need the extra hot water volume because in many places the water supply is colder than room temperature and the first tank allows the water to sit and reach room temperature before it's heated.)

PARALLEL

In parallel, the incoming cold water is split between the two water heaters. Hot water coming out of the two heaters is combined and sent on to the fixtures.
If you want to turn off one of the water heaters, you also have to close the valve to the inlet or the outlet. Otherwise you will just be mixing the cold water in one water heater with the hot water from the other heater.
Leaving one heater closed off for a long time is a bad idea because the water can become stagnant and foul.

SECOND PROBLEM: Pilot light going out
Just turning off one heater should not cause the pilot light on the other to go out.