The solar cycle for the earth is 365 days because that is how long it takes for the earth to complete a single orbit around the sun. Consequently, the lunar cycle is based on the lunar orbit around the earth. Since it takes 27 days for the moon to finish one orbit around the earth, the lunar cycle is 27 days. Depending on the relative position of the moon and earth in relation do the sun, varying amounts of the moon's surface reflects the light of the sun and this determines the phase of the moon (full, new, half moon, etc.).

The moon orbits the earth and it takes 27 days for the moon to complete its orbit. At each point in its journey, the moon has a different location relative to the earth and sun. When the moon is between the sun and the earth, the side of the moon that is illuminated by the sun is not facing the earth. This is what we call a "new moon", where we only see the dark side of the moon. At the other extreme is when the earth is between the sun and the moon. In this case we only see the illuminated side of the moon, or a "full moon." Similarly, all other moon phases are are determined by how much of the illuminated side of the moon is visible based on the relative positions of the moon, earth, and sun. A good diagram showing the different phases can be found in my reference link below.