Nuts are filled with nutrients and fiber to keep satiety levels higher and to provide all round health benefits. If you do not have a history or susceptibility to developing kidney stones, limiting your intake of nuts within the RDA (recommended dietary allowances) values daily will keep you kidneys clear of these painful accumulations.
Kidney stones can form from crystallization of calcium oxalate, calcium phosphate, uric acid, struvite or cystine. Nuts and other foods like spinach, beets, etc. are rich in oxalates. If you have had stones earlier or have a predisposition for chronically developing calcium oxalate kidney stones, your doctor will advise lowering the intake of these foods or completely eliminating it from the diet. Replace these with low-oxalate alternatives like avocados for their fiber and healthy fats.
Low levels of sodium, a key component in development of stones, in nuts makes them safer for consumption but salted nuts or nut butters are slightly higher in sodium, so eat them in limits to lower your risk or aggravate existing stones.