I read a book in 6th grade for school and I can't remember the title. It involved people living under domes on the moon. A couple of kids ended up stealing/taking a key that took them outside the dome to another dome by some sort of vehicle. I only remember them being in a weird but beautiful alienish garden.
That could be The Lotus Caves by John Christopher, 1969.
The plot of The Lotus Caves seems to match the plot points outlined in the question - two YA's take an unauthorised joyride after stealing access to a moon-buggy, they eventually discover a cave system (not another dome, which is a discrepancy) made habitable by an alien plant that forms an artificial ecosystem.