Look for a horizontal stain line on walls or columns, efflorescence, rust at the base of appliances and steel posts, fresh paint on only the lower walls, and a sump pit that has clearly been in use. Ask the seller directly and in writing.
More detail
A basement is easy to present well for a showing and hard to hide history from someone who knows where to look. The tells, roughly in order of reliability. A horizontal line on the wall, on a steel column, or on stored items marks a previous water level. Efflorescence on block or poured walls proves water has passed through. Rust at the base of a furnace, water heater, or steel lally column shows sustained contact with water. New paint or fresh sealer on the lower two or three feet of wall only, which is a very specific thing to repaint. A dehumidifier running in a supposedly dry basement. A sump pit with a stained interior and a pump with a well-used discharge line. And the smell, which is difficult to disguise for long. Outside, look at the same things a homeowner would fix if they had a problem: downspout extensions, a regraded strip along the foundation, a newly installed window well cover, a French drain in the yard. What to do with what you find. Ask the seller directly, in writing, whether the basement has taken water and whether any waterproofing work has been done. A prior repair with a transferable warranty is a positive rather than a negative, and asking for the paperwork is normal. On inspections: a standard home inspection is a visual walkover and will not open walls or evaluate a drainage system. If the signs are there, a waterproofing evaluation is a separate and inexpensive step during the inspection window. And the pricing question: a basement with a documented, warrantied interior drain system is a solved problem. A basement with fresh paint, a new dehumidifier, and no disclosure is an unpriced one.