There is no such law that prevents unmarried couple to book a hotel room in India. In most cases it is the discretion of hotel to provide the room. In your case, as you are above 18 you can book a hotel room in India but as your girlfriend is below 18 the hotel may reject your GF from check in.