In order to know the difference between the two, you should first know what they stand for. When you say AISI, this means American Iron and Steel Institute. ASTM, on the other hand, stands for the American Society for Testing and Materials. They obviously have different things that they focus on.
AISI will be focused on the quality of different iron products and also steel products. ASTM will be focused on iron and steel but will also be focused on other products that are not covered by the AISI such as rubber, plastic, textile, and petroleum. Take note that there are still other things that would be considered to be under ASTM.