when you make moonshine you have to do it at night. and the only way the shiners could see at night was by the moonlight. everything shiners do is almost always at night with the moon as light. hence the name moonshine.
c.1500, "moonlight," from moon (n.) + shine (n.). In figurative use, implying "appearance without substance," from late 15c.; perhaps connected in that sense with notion of "moonshine in water" (cf. moonraker). Meaning "illicit liquor" is attested from 1785 (earliest reference is to that smuggled on the coasts of Kent and Sussex); moonlight also occasionally was used in this sense early 19c. As a verb from 1883. Related: Moonshiner (1860).