So the event I believe you're referring to is the crossing from 376-378. This was the first of many major migrations across the Danube and Rhine Rivers in the fourth and fifth century, and one of the most dramatic. Your question is very relevant and important because it was the mistreatment of the Goths that led to the disaster that was the Battle of Adrianople.
There are many modern academic books and articles that deal with these events because they pervade so many areas of study, including economic, political, military, and social history, too many to list here. If you want to read some, probably start with Kulikowski, M. (2007). Rome's Gothic Wars. There are two main ancient sources that deal with these events, Ammianus Marcellinus' Res Gestae and Zosimus' Historia Novo. There are some differences between these two, but in combination the chain of events can be more or less established.
Both sources agree that it was the Huns that suddenly appeared in the region north of the Black Sea, around modern Ukraine/Russia/Poland. According to Jordanes, a sixth-century Roman/Gothic historian, the Goths came first from Sweden to Poland, and archaeological evidence seems to place them along the Vistula River. From there, fleeing from the Huns, they arrived on the Danube River in great numbers and petitioned to be allowed to cross the border and settle on the Roman land. In return, the Goths would provide the eastern Roman army with a great number of recruits. Emperor Valens was particularly excited about this prospect because he had his attention on the Persian Empire and was likely hoping to use the new recruits to conduct a major campaign against the Persians. Rome was still more-or-less under the terms of the shameful treaty of 363 that emperor Jovian had been forced to make to save the Roman army from starvation and destruction, and Valens hoped to force the Persians to renegotiate.
Therefore Valens consented to allow the Goths to cross, but he only gave permission to some of them, probably hoping that by splitting the Goths into smaller groups they would be easier to handle. The Theruingi were the ones allowed to cross. Both Ammianus and Zosimus agree that it was the officers and administrators in Thrace, the Roman province that the Theruingi crossed into, who mishandled the situation and mistreated the refugees. Zosimus says they failed to properly disarm the Goths because they were satisfying their appetites (probably insinuating rape) and seizing individuals to sell as slaves, while Ammianus also says that the Goths were taken as slaves and that they were denied food and the ability to travel freely. The question of why this happened has always been puzzling, because, as said above, if Valens wished to utilize these people as recruits in his army it does not make sense to mistreat them so harshly. The lack of food might be attributable to simply the logistical difficulties of supplying such a large number of people with food, but the other mistreatments have no reasonable explanation. In another passage, Ammianus implies that Lupicinus and Maximus, the two officials chiefly responsible for this mistreatment, were wholly corrupt and irresponsible, so maybe it was just a case of bad people taking advantage of the situation.
In response to this mistreatment, the Goths rebelled. The rest of the Goths who had not been granted entry crossed the Danube and the combined forces pillaged and ransacked their way through the Roman countryside. The Goths initially split into many smaller groups, which is a more efficient strategy for raiding. However, Valens quickly negotiated a truce with Persia and began transferring his main army back through Anatolia and across the Bosporus, and they were able to win some victories and force the Goths to regroup once again. The details of the campaigns are not really pertinent to your question, so I won't go into them. Eventually, in 378, Valens attacked the Goths in a rather hasty and unplanned move, without waiting for the western Empire's reinforcements. Not only was it a bad time to force a confrontation, but Valens also made multiple tactical blunders and the battle ended as a disaster for the Romans, who suffered many casualties, the loss of multiple senior generals, and Valens himself died in the fighting.
The aftermath of the battle is rather unclear. Ammianus' account continues to describe how the Goths unsuccessfully besieged the city of Adrianople and marched towards Constantinople to make an attempt on that city, but were turned away by the guerilla tactics of some Saracen soldiers who fought for the Romans. He then says they spread throughout the area as far as the Julian Alps, which border modern Italy and Slovenia. Ammianus ends his narrative there. Zosimus says that Gratian, the western emperor, heard of Valens' defeat and appointed Theodosius as the next eastern emperor, and charged him with pacifying all the provinces that were being ravaged by the barbarians. Zosimus describes that, since the Roman army had been defeated, even more barbarians had crossed the Danube and had taken control of all the countryside, although the fortified towns and cities remained outside their possession. Theodosius made use of some barbarian allies and made a successful ambush on the Goths when they were drunk, taking many as slaves, but the raiding persisted.
Laws from the time indicate that Theodosius was desperate to find new recruits to form a new army. By 380, the western Goths had been pacified by Gratian, but in the same year, the eastern Goths defeated Theodosius' new army. In the following year, Gratian sent an army to aid Theodosius, and peace was finally made with the Goths in 382. The details of this peace are not clear, but a speech made in 383 praises Theodosius for settling the goths in the province of Thrace. Because of the situation that was highly unfavorable for the Romans, the Goths seem to have been able to negotiate a treaty that was very favorable to them, and they settled in their own social structures and culture, rather than being dispersed amongst existing Roman settlements, as had been the practice previously. They also seem to have been treated fairly, the Romans probably learning from their past mistakes. However, in the 394 Battle of the Frigidus, Theodosius basically repeated the old mistakes, by forcing the Gothic contingents of his army to take the front ranks of the charge. This made the Goths suffer significantly higher casualties than their Roman counterparts, which was one of the main reasons these Goths would again rebel.