It is normal for an electric scooter, bike, or go kart battery charger to be warm when it is plugged into the wall and the vehicle, however if it is too hot to touch that is a sign of a problem either with the battery charger or possibly with the battery pack. There has been one case of an electric scooter battery charger being recalled because it could overheat and cause minor burns when touched. The brand name of the battery charger that was recalled is PowMax.
Old battery packs that have been sitting for an extended period of time without being recharged may not be able to take a charge which can cause battery chargers to overheat by placing more of a load on them for a longer amount of time than they are designed for. Although not as likely a newer battery pack could also cause the same problem if one of its batteries developed a bad cell due to a manufacturing defect or from a physical impact.
If the battery pack is old, worn out, or does not have enough power in it to run the scooter then I would replace it and see if that helps. If the battery charger still runs hot after that then I would replace it as well. Another good test to perform is to run the charger for a while with it plugged into the wall but not plugged into the vehicle, if it overheats during this test then it is surely faulty and needs to be replaced.