Flank pain and tenderness can arise from various underlying conditions, including kidney stones, urinary tract infections, or pyelonephritis, which is an infection of the kidneys. Other possible causes include musculoskeletal issues such as strained muscles, herniated discs, or rib fractures. Additionally, visceral pain from conditions affecting nearby organs such as the liver or pancreas can also manifest as discomfort in the flank region.