This is one of those tricky sorts of claims, because there is a half-truth buried in it, but it is very misleading as a whole.
No, the US did not drop the bombs to see what the damage would be, as an "experiment." While there were many motivations (held by numerous people) for dropping the bombs, this is not one that was ever expressed. Actual motivations you find in the historical record are, in no particular order, 1) a desire to end the war quickly, 2) a desire for the creators of the bomb to impress upon their leaders that the expense and effort had been justified, 3) a desire to impress upon the USSR that the US has a new card up its sleeve, and 4) a desire to impress upon the entire world what kind of new power has been introduced into the world, with the hopes that this demonstration would cause the states of the world to realize that war in the future would be incredibly ruinous and that they needed a more effective international system to prevent war, especially nuclear war.
Again, that list is in no particular order, though #1 was the most explicitly stated one by the largest n umber of people. #2 was only a component for some of the people at the very top of the hierarchy and even they would subsume it to #1. #3 was something voiced explicitly at times by the Secretary of State, James Byrnes, and may have had some influence on Truman himself, but again, it was only one of several motivations. #4 was mostly held by certain scientists at the top of the project, with some influence on the Secretary of War, Henry Stimson, as well. Motivations need not universally agreed upon, and may not be universally convincing, and any given individual is allowed to have multiple motivations, because we are talking about real human beings here.
OK. So what about the "bombs as experiments" line? I've never seen it as an expressed motivation. But there is, as I said, a half-truth here. They were very interested in knowing the results of the bombing — what the effects of an atomic bomb would be on a city, on buildings, on human and ecological life, and so on. Because they weren't expecting they were going to get many more opportunities to study such a thing, and while you can do a lot of tests, there's nothing quite like a "real world" environment. If you expect a future in which nuclear weapons might be used again, it is a good thing to know what they do. (And, indeed, much of our understanding of nuclear effects on cities, and even radiation effects on human beings, comes from Hiroshima/Nagasaki data.)
So on the bomb attacks themselves, they did drop instrumentation at the same time (e.g. blast gauges) with the hope that they might later recover them and be able to learn some things about the bombs that were used. After the war ended, they immediately sent both troops and scientists into Hiroshima and Nagasaki to take photographs, make measurements, and talk with medical and military authorities about the effects. In fact the US and Japanese have had a joint organization to study the long-term radiation effects on the hibakusha ("atomic bomb victims") since this time (today it is called the Radiation Effects Research Foundation but it has had other names, like the Atomic Bomb Casualty Commission), because this is an important dataset for correlating radiation exposures with health outcomes.
So were they interested in the effects? Oh, yes. Very much so. But was that ever states as a reason for dropping the bomb? I have not seen anything that made me think that was really on anyone's minds. Was it an "experiment"? Scientists call this setup an "experiment of opportunity": something happened that you didn't intend to be an experiment, and that you probably couldn't run as an experiment (for ethical reasons), but you could use the results anyway. Natural disasters provide this sort of "data" for human beings all the time ("What happens if you have a volcano explode near a bunch of cities?"), as do scientific and industrial accidents (the fallout dispersion by 1954 Castle Bravo test provided such an "opportunity" as well).
Is there any way to distinguish whether this was a "plan" or not? That is, what if people never said it but really believed it? That's a hard thing to suss out, obviously, but I will note that they were in such a "rush" towards the end of the war to just use the bombs that while they did a lot of planning for what to do immediately after the bombs were dropped (e.g., release statements to the press), they did very little planning for what to do after Japan had surrendered, in part because they did not know when that would occur (because they could not see the future). That is, they didn't know that two bombs plus the Soviet invasion of Manchuria would cause Japan to surrender within a week. In fact, the top Manhattan Project people thought it would probably not lead to an immediate surrender — General Groves thought it might take half-a-dozen atomic bombs to convince them to give it up. In many ways the US forces were surprised that Japan surrendered when it did, and had to rapidly adjust their plans for the new Occupation. And so it was not until late August 1945, well after the bombs were dropped, that the Manhattan Project people decided that they would send an expedition to Hiroshima and Nagasaki, picked the people who would go, and so on. The plan to "observe" the effects was pretty disorganized and has no evidence of some kind of long-planned out effort. So for me that is also pretty good evidence that this was not some kind of serious motivation for dropping the bombs — if it was, you'd expect them to have at least made earlier plans regarding investigating the effects of them.
Of course, it's hard to prove a negative. But in my view the evidence shows that while they had a lot of motivations for dropping them, this wasn't really one of them. It's always possible that nothing ended up "on the books" about this topic, though frankly that would be surprising to me since lots of other "looks kind of bad in hindsight" things did end up on the books.
On the lack of foreknowledge about the end of the war, Michael Gordin's Five Days in August does a great job. On the studies made of the hibakusha, and the organization of the observation work, see M. Susan Lindee's Suffering Made Real. On the many motivations for using the bombs, they are covered pretty well in Tsuyoshi Hasegawa's Racing the Enemy, Richard Rhodes' The Making of the Atomic Bomb, and Gar Alperovitz's The Decision to Use the Atomic Bomb (Alperovitz focuses mostly on the "diplomatic" motivation, which is one of many, but he does a good job documenting that one, even though his overall thesis is problematic). For a first-hand account of one of the scientists sent to Japan, see Robert Serber's Peace and War, which is something of an autobiography. For the output of their findings, see the US Strategic Bombing Survey's The Effects of Atomic Bombs on Hiroshima and Nagaski (1946), and A.W. Oughterton and A. Oughterson and S. Warren, eds., Medical Effects of the Atomic Bomb in Japan (1951), for a few "contemporary" sources. For modern-day research on the effects, see the publications of the Radiation Effects Research Foundation.
One of the recent ask historians podcast deals with this subject at lengths. Check it out, it's good.