Rattling in older homes occurs because of a couple of reasons. The first is the pipes strapping has either come loose or loosened up over the years due to expansion and contraction of the water pipes. The second is harmonic vibration caused by the water hydrolics in the pipe due to calcium and lime buildup. Since the interior of the pipe was once smooth, but after years of deposits, baubles of calcium like little balls attached to the inside of the water pipe occur. This creates small vortexes like whirlpools. These little devils can cause the pipe to make a lot of noise.
The problem with the toilet typically is an easy problem to fix and can cause some rattling. The ball cock (fill valve) inside the toilet has a rubber diaphram, which hardens from age. This gasket is designed to push against a brass or plastic seat. But since its hard as rock, it can not quite form to the seat and seal completely. So it bounces just a millimeter up, then slamms shut again. The vibrations created are very much like those produced by the lips of a trumpet player, and the instrument is your plumbing system. The reason the toilet comes on again, can be twofold, the flapper and or the seat may be bad. The flapper rests against a plastic or brass seat in the toilet tank, when you push on the flush handle it pulls up the flapper with a chain, or lift rod. Once the water goes out of the tank it resettles into position. But when the flapper is bad (hardened or cracked) it cannot seal any more so it lets a very small amount of water out even though the fill valve is off. When the water finally drops down to the point where the fill valve registers it, it turns on and sounds like its filling again. Replacing the flapper sometimes helps, but if the seat it rests against has some grooves in it from water deterioration, you will have to replace the flush valve as well. Many have tried using sand cloth or a dremmel to buff it out, but its a short term fix. The way to tell is to put a little blue or red die into the water of the tank, if it suddenly over a few minutes changes the color of the water in the bowl, you have found your problem.