the fact they have come loose is one of three things,
a, they were not tight in the first place
b, they came loose due to not having any "locking" effect like a nyloc nut
C, by far the worst, the threads have stripped from the head and the stud is pulling out, quite common, a helicoil is the only way to fix.